var oq=Object.defineProperty;var MP=e=>{throw TypeError(e)};var aq=(e,t,n)=>t in e?oq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ye=(e,t,n)=>aq(e,typeof t!="symbol"?t+"":t,n),Vy=(e,t,n)=>t.has(e)||MP("Cannot "+n);var q=(e,t,n)=>(Vy(e,t,"read from private field"),n?n.call(e):t.get(e)),je=(e,t,n)=>t.has(e)?MP("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ve=(e,t,n,r)=>(Vy(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),qe=(e,t,n)=>(Vy(e,t,"access private method"),n);var cd=(e,t,n,r)=>({set _(i){ve(e,t,i,n)},get _(){return q(e,t,r)}});function sq(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var fd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function rt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Wy={exports:{}},ru={},Hy={exports:{}},Be={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var NP;function lq(){if(NP)return Be;NP=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.iterator;function y(D){return D===null||typeof D!="object"?null:(D=p&&D[p]||D["@@iterator"],typeof D=="function"?D:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,b={};function v(D,K,ae){this.props=D,this.context=K,this.refs=b,this.updater=ae||g}v.prototype.isReactComponent={},v.prototype.setState=function(D,K){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,K,"setState")},v.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function w(){}w.prototype=v.prototype;function A(D,K,ae){this.props=D,this.context=K,this.refs=b,this.updater=ae||g}var O=A.prototype=new w;O.constructor=A,S(O,v.prototype),O.isPureReactComponent=!0;var T=Array.isArray,P=Object.prototype.hasOwnProperty,C={current:null},k={key:!0,ref:!0,__self:!0,__source:!0};function j(D,K,ae){var he,me={},ce=null,Ee=null;if(K!=null)for(he in K.ref!==void 0&&(Ee=K.ref),K.key!==void 0&&(ce=""+K.key),K)P.call(K,he)&&!k.hasOwnProperty(he)&&(me[he]=K[he]);var Te=arguments.length-2;if(Te===1)me.children=ae;else if(1>>1,K=Q[D];if(0>>1;Di(me,V))cei(Ee,me)?(Q[D]=Ee,Q[ce]=V,D=ce):(Q[D]=me,Q[he]=V,D=he);else if(cei(Ee,V))Q[D]=Ee,Q[ce]=V,D=ce;else break e}}return ne}function i(Q,ne){var V=Q.sortIndex-ne.sortIndex;return V!==0?V:Q.id-ne.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var c=[],f=[],h=1,p=null,y=3,g=!1,S=!1,b=!1,v=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function O(Q){for(var ne=n(f);ne!==null;){if(ne.callback===null)r(f);else if(ne.startTime<=Q)r(f),ne.sortIndex=ne.expirationTime,t(c,ne);else break;ne=n(f)}}function T(Q){if(b=!1,O(Q),!S)if(n(c)!==null)S=!0,J(P);else{var ne=n(f);ne!==null&&ee(T,ne.startTime-Q)}}function P(Q,ne){S=!1,b&&(b=!1,w(j),j=-1),g=!0;var V=y;try{for(O(ne),p=n(c);p!==null&&(!(p.expirationTime>ne)||Q&&!L());){var D=p.callback;if(typeof D=="function"){p.callback=null,y=p.priorityLevel;var K=D(p.expirationTime<=ne);ne=e.unstable_now(),typeof K=="function"?p.callback=K:p===n(c)&&r(c),O(ne)}else r(c);p=n(c)}if(p!==null)var ae=!0;else{var he=n(f);he!==null&&ee(T,he.startTime-ne),ae=!1}return ae}finally{p=null,y=V,g=!1}}var C=!1,k=null,j=-1,N=5,U=-1;function L(){return!(e.unstable_now()-UQ||125D?(Q.sortIndex=V,t(f,Q),n(c)===null&&Q===n(f)&&(b?(w(j),j=-1):b=!0,ee(T,V-D))):(Q.sortIndex=K,t(c,Q),S||g||(S=!0,J(P))),Q},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(Q){var ne=y;return function(){var V=y;y=ne;try{return Q.apply(this,arguments)}finally{y=V}}}})(Qy)),Qy}var BP;function dq(){return BP||(BP=1,Gy.exports=fq()),Gy.exports}/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var FP;function hq(){if(FP)return Pn;FP=1;var e=I1(),t=dq();function n(a){for(var u="https://reactjs.org/docs/error-decoder.html?invariant="+a,d=1;d"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,h={},p={};function y(a){return c.call(p,a)?!0:c.call(h,a)?!1:f.test(a)?p[a]=!0:(h[a]=!0,!1)}function g(a,u,d,m){if(d!==null&&d.type===0)return!1;switch(typeof u){case"function":case"symbol":return!0;case"boolean":return m?!1:d!==null?!d.acceptsBooleans:(a=a.toLowerCase().slice(0,5),a!=="data-"&&a!=="aria-");default:return!1}}function S(a,u,d,m){if(u===null||typeof u>"u"||g(a,u,d,m))return!0;if(m)return!1;if(d!==null)switch(d.type){case 3:return!u;case 4:return u===!1;case 5:return isNaN(u);case 6:return isNaN(u)||1>u}return!1}function b(a,u,d,m,x,_,R){this.acceptsBooleans=u===2||u===3||u===4,this.attributeName=m,this.attributeNamespace=x,this.mustUseProperty=d,this.propertyName=a,this.type=u,this.sanitizeURL=_,this.removeEmptyString=R}var v={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){v[a]=new b(a,0,!1,a,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var u=a[0];v[u]=new b(u,1,!1,a[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(a){v[a]=new b(a,2,!1,a.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){v[a]=new b(a,2,!1,a,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){v[a]=new b(a,3,!1,a.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(a){v[a]=new b(a,3,!0,a,null,!1,!1)}),["capture","download"].forEach(function(a){v[a]=new b(a,4,!1,a,null,!1,!1)}),["cols","rows","size","span"].forEach(function(a){v[a]=new b(a,6,!1,a,null,!1,!1)}),["rowSpan","start"].forEach(function(a){v[a]=new b(a,5,!1,a.toLowerCase(),null,!1,!1)});var w=/[\-:]([a-z])/g;function A(a){return a[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var u=a.replace(w,A);v[u]=new b(u,1,!1,a,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var u=a.replace(w,A);v[u]=new b(u,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(a){var u=a.replace(w,A);v[u]=new b(u,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(a){v[a]=new b(a,1,!1,a.toLowerCase(),null,!1,!1)}),v.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(a){v[a]=new b(a,1,!1,a.toLowerCase(),null,!0,!0)});function O(a,u,d,m){var x=v.hasOwnProperty(u)?v[u]:null;(x!==null?x.type!==0:m||!(2I||x[R]!==_[I]){var B=` `+x[R].replace(" at new "," at ");return a.displayName&&B.includes("")&&(B=B.replace("",a.displayName)),B}while(1<=R&&0<=I);break}}}finally{ae=!1,Error.prepareStackTrace=d}return(a=a?a.displayName||a.name:"")?K(a):""}function me(a){switch(a.tag){case 5:return K(a.type);case 16:return K("Lazy");case 13:return K("Suspense");case 19:return K("SuspenseList");case 0:case 2:case 15:return a=he(a.type,!1),a;case 11:return a=he(a.type.render,!1),a;case 1:return a=he(a.type,!0),a;default:return""}}function ce(a){if(a==null)return null;if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case k:return"Fragment";case C:return"Portal";case N:return"Profiler";case j:return"StrictMode";case G:return"Suspense";case F:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case L:return(a.displayName||"Context")+".Consumer";case U:return(a._context.displayName||"Context")+".Provider";case $:var u=a.render;return a=a.displayName,a||(a=u.displayName||u.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case X:return u=a.displayName||null,u!==null?u:ce(a.type)||"Memo";case J:u=a._payload,a=a._init;try{return ce(a(u))}catch{}}return null}function Ee(a){var u=a.type;switch(a.tag){case 24:return"Cache";case 9:return(u.displayName||"Context")+".Consumer";case 10:return(u._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return a=u.render,a=a.displayName||a.name||"",u.displayName||(a!==""?"ForwardRef("+a+")":"ForwardRef");case 7:return"Fragment";case 5:return u;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ce(u);case 8:return u===j?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u}return null}function Te(a){switch(typeof a){case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function ie(a){var u=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function Oe(a){var u=ie(a)?"checked":"value",d=Object.getOwnPropertyDescriptor(a.constructor.prototype,u),m=""+a[u];if(!a.hasOwnProperty(u)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var x=d.get,_=d.set;return Object.defineProperty(a,u,{configurable:!0,get:function(){return x.call(this)},set:function(R){m=""+R,_.call(this,R)}}),Object.defineProperty(a,u,{enumerable:d.enumerable}),{getValue:function(){return m},setValue:function(R){m=""+R},stopTracking:function(){a._valueTracker=null,delete a[u]}}}}function Ce(a){a._valueTracker||(a._valueTracker=Oe(a))}function oe(a){if(!a)return!1;var u=a._valueTracker;if(!u)return!0;var d=u.getValue(),m="";return a&&(m=ie(a)?a.checked?"true":"false":a.value),a=m,a!==d?(u.setValue(a),!0):!1}function He(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}function De(a,u){var d=u.checked;return V({},u,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:d??a._wrapperState.initialChecked})}function Ge(a,u){var d=u.defaultValue==null?"":u.defaultValue,m=u.checked!=null?u.checked:u.defaultChecked;d=Te(u.value!=null?u.value:d),a._wrapperState={initialChecked:m,initialValue:d,controlled:u.type==="checkbox"||u.type==="radio"?u.checked!=null:u.value!=null}}function xe(a,u){u=u.checked,u!=null&&O(a,"checked",u,!1)}function Qe(a,u){xe(a,u);var d=Te(u.value),m=u.type;if(d!=null)m==="number"?(d===0&&a.value===""||a.value!=d)&&(a.value=""+d):a.value!==""+d&&(a.value=""+d);else if(m==="submit"||m==="reset"){a.removeAttribute("value");return}u.hasOwnProperty("value")?Ft(a,u.type,d):u.hasOwnProperty("defaultValue")&&Ft(a,u.type,Te(u.defaultValue)),u.checked==null&&u.defaultChecked!=null&&(a.defaultChecked=!!u.defaultChecked)}function Tt(a,u,d){if(u.hasOwnProperty("value")||u.hasOwnProperty("defaultValue")){var m=u.type;if(!(m!=="submit"&&m!=="reset"||u.value!==void 0&&u.value!==null))return;u=""+a._wrapperState.initialValue,d||u===a.value||(a.value=u),a.defaultValue=u}d=a.name,d!==""&&(a.name=""),a.defaultChecked=!!a._wrapperState.initialChecked,d!==""&&(a.name=d)}function Ft(a,u,d){(u!=="number"||He(a.ownerDocument)!==a)&&(d==null?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+d&&(a.defaultValue=""+d))}var Mn=Array.isArray;function nn(a,u,d,m){if(a=a.options,u){u={};for(var x=0;x"+u.valueOf().toString()+"",u=tf.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;u.firstChild;)a.appendChild(u.firstChild)}});function bl(a,u){if(u){var d=a.firstChild;if(d&&d===a.lastChild&&d.nodeType===3){d.nodeValue=u;return}}a.textContent=u}var xl={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},u4=["Webkit","ms","Moz","O"];Object.keys(xl).forEach(function(a){u4.forEach(function(u){u=u+a.charAt(0).toUpperCase()+a.substring(1),xl[u]=xl[a]})});function G_(a,u,d){return u==null||typeof u=="boolean"||u===""?"":d||typeof u!="number"||u===0||xl.hasOwnProperty(a)&&xl[a]?(""+u).trim():u+"px"}function Q_(a,u){a=a.style;for(var d in u)if(u.hasOwnProperty(d)){var m=d.indexOf("--")===0,x=G_(d,u[d],m);d==="float"&&(d="cssFloat"),m?a.setProperty(d,x):a[d]=x}}var c4=V({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function nm(a,u){if(u){if(c4[a]&&(u.children!=null||u.dangerouslySetInnerHTML!=null))throw Error(n(137,a));if(u.dangerouslySetInnerHTML!=null){if(u.children!=null)throw Error(n(60));if(typeof u.dangerouslySetInnerHTML!="object"||!("__html"in u.dangerouslySetInnerHTML))throw Error(n(61))}if(u.style!=null&&typeof u.style!="object")throw Error(n(62))}}function rm(a,u){if(a.indexOf("-")===-1)return typeof u.is=="string";switch(a){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var im=null;function om(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var am=null,Ca=null,ka=null;function X_(a){if(a=ql(a)){if(typeof am!="function")throw Error(n(280));var u=a.stateNode;u&&(u=Of(u),am(a.stateNode,a.type,u))}}function Y_(a){Ca?ka?ka.push(a):ka=[a]:Ca=a}function Z_(){if(Ca){var a=Ca,u=ka;if(ka=Ca=null,X_(a),u)for(a=0;a>>=0,a===0?32:31-(w4(a)/S4|0)|0}var sf=64,lf=4194304;function Al(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return a}}function uf(a,u){var d=a.pendingLanes;if(d===0)return 0;var m=0,x=a.suspendedLanes,_=a.pingedLanes,R=d&268435455;if(R!==0){var I=R&~x;I!==0?m=Al(I):(_&=R,_!==0&&(m=Al(_)))}else R=d&~x,R!==0?m=Al(R):_!==0&&(m=Al(_));if(m===0)return 0;if(u!==0&&u!==m&&(u&x)===0&&(x=m&-m,_=u&-u,x>=_||x===16&&(_&4194240)!==0))return u;if((m&4)!==0&&(m|=d&16),u=a.entangledLanes,u!==0)for(a=a.entanglements,u&=m;0d;d++)u.push(a);return u}function Ol(a,u,d){a.pendingLanes|=u,u!==536870912&&(a.suspendedLanes=0,a.pingedLanes=0),a=a.eventTimes,u=31-cr(u),a[u]=d}function P4(a,u){var d=a.pendingLanes&~u;a.pendingLanes=u,a.suspendedLanes=0,a.pingedLanes=0,a.expiredLanes&=u,a.mutableReadLanes&=u,a.entangledLanes&=u,u=a.entanglements;var m=a.eventTimes;for(a=a.expirationTimes;0=Ml),PA=" ",EA=!1;function TA(a,u){switch(a){case"keyup":return eU.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function CA(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Ma=!1;function nU(a,u){switch(a){case"compositionend":return CA(u);case"keypress":return u.which!==32?null:(EA=!0,PA);case"textInput":return a=u.data,a===PA&&EA?null:a;default:return null}}function rU(a,u){if(Ma)return a==="compositionend"||!Am&&TA(a,u)?(a=xA(),pf=gm=Ti=null,Ma=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1=u)return{node:d,offset:u-a};a=m}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=DA(d)}}function $A(a,u){return a&&u?a===u?!0:a&&a.nodeType===3?!1:u&&u.nodeType===3?$A(a,u.parentNode):"contains"in a?a.contains(u):a.compareDocumentPosition?!!(a.compareDocumentPosition(u)&16):!1:!1}function BA(){for(var a=window,u=He();u instanceof a.HTMLIFrameElement;){try{var d=typeof u.contentWindow.location.href=="string"}catch{d=!1}if(d)a=u.contentWindow;else break;u=He(a.document)}return u}function Em(a){var u=a&&a.nodeName&&a.nodeName.toLowerCase();return u&&(u==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||u==="textarea"||a.contentEditable==="true")}function dU(a){var u=BA(),d=a.focusedElem,m=a.selectionRange;if(u!==d&&d&&d.ownerDocument&&$A(d.ownerDocument.documentElement,d)){if(m!==null&&Em(d)){if(u=m.start,a=m.end,a===void 0&&(a=u),"selectionStart"in d)d.selectionStart=u,d.selectionEnd=Math.min(a,d.value.length);else if(a=(u=d.ownerDocument||document)&&u.defaultView||window,a.getSelection){a=a.getSelection();var x=d.textContent.length,_=Math.min(m.start,x);m=m.end===void 0?_:Math.min(m.end,x),!a.extend&&_>m&&(x=m,m=_,_=x),x=LA(d,_);var R=LA(d,m);x&&R&&(a.rangeCount!==1||a.anchorNode!==x.node||a.anchorOffset!==x.offset||a.focusNode!==R.node||a.focusOffset!==R.offset)&&(u=u.createRange(),u.setStart(x.node,x.offset),a.removeAllRanges(),_>m?(a.addRange(u),a.extend(R.node,R.offset)):(u.setEnd(R.node,R.offset),a.addRange(u)))}}for(u=[],a=d;a=a.parentNode;)a.nodeType===1&&u.push({element:a,left:a.scrollLeft,top:a.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d=document.documentMode,Na=null,Tm=null,Ll=null,Cm=!1;function FA(a,u,d){var m=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;Cm||Na==null||Na!==He(m)||(m=Na,"selectionStart"in m&&Em(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),Ll&&Dl(Ll,m)||(Ll=m,m=Sf(Tm,"onSelect"),0Ba||(a.current=Um[Ba],Um[Ba]=null,Ba--)}function lt(a,u){Ba++,Um[Ba]=a.current,a.current=u}var ji={},rn=Ri(ji),wn=Ri(!1),Ao=ji;function Fa(a,u){var d=a.type.contextTypes;if(!d)return ji;var m=a.stateNode;if(m&&m.__reactInternalMemoizedUnmaskedChildContext===u)return m.__reactInternalMemoizedMaskedChildContext;var x={},_;for(_ in d)x[_]=u[_];return m&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=u,a.__reactInternalMemoizedMaskedChildContext=x),x}function Sn(a){return a=a.childContextTypes,a!=null}function Pf(){ft(wn),ft(rn)}function tO(a,u,d){if(rn.current!==ji)throw Error(n(168));lt(rn,u),lt(wn,d)}function nO(a,u,d){var m=a.stateNode;if(u=u.childContextTypes,typeof m.getChildContext!="function")return d;m=m.getChildContext();for(var x in m)if(!(x in u))throw Error(n(108,Ee(a)||"Unknown",x));return V({},d,m)}function Ef(a){return a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||ji,Ao=rn.current,lt(rn,a),lt(wn,wn.current),!0}function rO(a,u,d){var m=a.stateNode;if(!m)throw Error(n(169));d?(a=nO(a,u,Ao),m.__reactInternalMemoizedMergedChildContext=a,ft(wn),ft(rn),lt(rn,a)):ft(wn),lt(wn,d)}var Qr=null,Tf=!1,qm=!1;function iO(a){Qr===null?Qr=[a]:Qr.push(a)}function AU(a){Tf=!0,iO(a)}function Mi(){if(!qm&&Qr!==null){qm=!0;var a=0,u=nt;try{var d=Qr;for(nt=1;a>=R,x-=R,Xr=1<<32-cr(u)+x|d<Ie?(zt=Re,Re=null):zt=Re.sibling;var Xe=se(Y,Re,Z[Ie],fe);if(Xe===null){Re===null&&(Re=zt);break}a&&Re&&Xe.alternate===null&&u(Y,Re),W=_(Xe,W,Ie),ke===null?Pe=Xe:ke.sibling=Xe,ke=Xe,Re=zt}if(Ie===Z.length)return d(Y,Re),pt&&Po(Y,Ie),Pe;if(Re===null){for(;IeIe?(zt=Re,Re=null):zt=Re.sibling;var qi=se(Y,Re,Xe.value,fe);if(qi===null){Re===null&&(Re=zt);break}a&&Re&&qi.alternate===null&&u(Y,Re),W=_(qi,W,Ie),ke===null?Pe=qi:ke.sibling=qi,ke=qi,Re=zt}if(Xe.done)return d(Y,Re),pt&&Po(Y,Ie),Pe;if(Re===null){for(;!Xe.done;Ie++,Xe=Z.next())Xe=ue(Y,Xe.value,fe),Xe!==null&&(W=_(Xe,W,Ie),ke===null?Pe=Xe:ke.sibling=Xe,ke=Xe);return pt&&Po(Y,Ie),Pe}for(Re=m(Y,Re);!Xe.done;Ie++,Xe=Z.next())Xe=ye(Re,Y,Ie,Xe.value,fe),Xe!==null&&(a&&Xe.alternate!==null&&Re.delete(Xe.key===null?Ie:Xe.key),W=_(Xe,W,Ie),ke===null?Pe=Xe:ke.sibling=Xe,ke=Xe);return a&&Re.forEach(function(iq){return u(Y,iq)}),pt&&Po(Y,Ie),Pe}function Ot(Y,W,Z,fe){if(typeof Z=="object"&&Z!==null&&Z.type===k&&Z.key===null&&(Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case P:e:{for(var Pe=Z.key,ke=W;ke!==null;){if(ke.key===Pe){if(Pe=Z.type,Pe===k){if(ke.tag===7){d(Y,ke.sibling),W=x(ke,Z.props.children),W.return=Y,Y=W;break e}}else if(ke.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===J&&cO(Pe)===ke.type){d(Y,ke.sibling),W=x(ke,Z.props),W.ref=zl(Y,ke,Z),W.return=Y,Y=W;break e}d(Y,ke);break}else u(Y,ke);ke=ke.sibling}Z.type===k?(W=No(Z.props.children,Y.mode,fe,Z.key),W.return=Y,Y=W):(fe=nd(Z.type,Z.key,Z.props,null,Y.mode,fe),fe.ref=zl(Y,W,Z),fe.return=Y,Y=fe)}return R(Y);case C:e:{for(ke=Z.key;W!==null;){if(W.key===ke)if(W.tag===4&&W.stateNode.containerInfo===Z.containerInfo&&W.stateNode.implementation===Z.implementation){d(Y,W.sibling),W=x(W,Z.children||[]),W.return=Y,Y=W;break e}else{d(Y,W);break}else u(Y,W);W=W.sibling}W=By(Z,Y.mode,fe),W.return=Y,Y=W}return R(Y);case J:return ke=Z._init,Ot(Y,W,ke(Z._payload),fe)}if(Mn(Z))return we(Y,W,Z,fe);if(ne(Z))return Ae(Y,W,Z,fe);jf(Y,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"?(Z=""+Z,W!==null&&W.tag===6?(d(Y,W.sibling),W=x(W,Z),W.return=Y,Y=W):(d(Y,W),W=$y(Z,Y.mode,fe),W.return=Y,Y=W),R(Y)):d(Y,W)}return Ot}var Va=fO(!0),dO=fO(!1),Mf=Ri(null),Nf=null,Wa=null,Gm=null;function Qm(){Gm=Wa=Nf=null}function Xm(a){var u=Mf.current;ft(Mf),a._currentValue=u}function Ym(a,u,d){for(;a!==null;){var m=a.alternate;if((a.childLanes&u)!==u?(a.childLanes|=u,m!==null&&(m.childLanes|=u)):m!==null&&(m.childLanes&u)!==u&&(m.childLanes|=u),a===d)break;a=a.return}}function Ha(a,u){Nf=a,Gm=Wa=null,a=a.dependencies,a!==null&&a.firstContext!==null&&((a.lanes&u)!==0&&(_n=!0),a.firstContext=null)}function Kn(a){var u=a._currentValue;if(Gm!==a)if(a={context:a,memoizedValue:u,next:null},Wa===null){if(Nf===null)throw Error(n(308));Wa=a,Nf.dependencies={lanes:0,firstContext:a}}else Wa=Wa.next=a;return u}var Eo=null;function Zm(a){Eo===null?Eo=[a]:Eo.push(a)}function hO(a,u,d,m){var x=u.interleaved;return x===null?(d.next=d,Zm(u)):(d.next=x.next,x.next=d),u.interleaved=d,Zr(a,m)}function Zr(a,u){a.lanes|=u;var d=a.alternate;for(d!==null&&(d.lanes|=u),d=a,a=a.return;a!==null;)a.childLanes|=u,d=a.alternate,d!==null&&(d.childLanes|=u),d=a,a=a.return;return d.tag===3?d.stateNode:null}var Ni=!1;function Jm(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function pO(a,u){a=a.updateQueue,u.updateQueue===a&&(u.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function Jr(a,u){return{eventTime:a,lane:u,tag:0,payload:null,callback:null,next:null}}function Ii(a,u,d){var m=a.updateQueue;if(m===null)return null;if(m=m.shared,(Ke&2)!==0){var x=m.pending;return x===null?u.next=u:(u.next=x.next,x.next=u),m.pending=u,Zr(a,d)}return x=m.interleaved,x===null?(u.next=u,Zm(m)):(u.next=x.next,x.next=u),m.interleaved=u,Zr(a,d)}function If(a,u,d){if(u=u.updateQueue,u!==null&&(u=u.shared,(d&4194240)!==0)){var m=u.lanes;m&=a.pendingLanes,d|=m,u.lanes=d,hm(a,d)}}function mO(a,u){var d=a.updateQueue,m=a.alternate;if(m!==null&&(m=m.updateQueue,d===m)){var x=null,_=null;if(d=d.firstBaseUpdate,d!==null){do{var R={eventTime:d.eventTime,lane:d.lane,tag:d.tag,payload:d.payload,callback:d.callback,next:null};_===null?x=_=R:_=_.next=R,d=d.next}while(d!==null);_===null?x=_=u:_=_.next=u}else x=_=u;d={baseState:m.baseState,firstBaseUpdate:x,lastBaseUpdate:_,shared:m.shared,effects:m.effects},a.updateQueue=d;return}a=d.lastBaseUpdate,a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=u}function Df(a,u,d,m){var x=a.updateQueue;Ni=!1;var _=x.firstBaseUpdate,R=x.lastBaseUpdate,I=x.shared.pending;if(I!==null){x.shared.pending=null;var B=I,te=B.next;B.next=null,R===null?_=te:R.next=te,R=B;var le=a.alternate;le!==null&&(le=le.updateQueue,I=le.lastBaseUpdate,I!==R&&(I===null?le.firstBaseUpdate=te:I.next=te,le.lastBaseUpdate=B))}if(_!==null){var ue=x.baseState;R=0,le=te=B=null,I=_;do{var se=I.lane,ye=I.eventTime;if((m&se)===se){le!==null&&(le=le.next={eventTime:ye,lane:0,tag:I.tag,payload:I.payload,callback:I.callback,next:null});e:{var we=a,Ae=I;switch(se=u,ye=d,Ae.tag){case 1:if(we=Ae.payload,typeof we=="function"){ue=we.call(ye,ue,se);break e}ue=we;break e;case 3:we.flags=we.flags&-65537|128;case 0:if(we=Ae.payload,se=typeof we=="function"?we.call(ye,ue,se):we,se==null)break e;ue=V({},ue,se);break e;case 2:Ni=!0}}I.callback!==null&&I.lane!==0&&(a.flags|=64,se=x.effects,se===null?x.effects=[I]:se.push(I))}else ye={eventTime:ye,lane:se,tag:I.tag,payload:I.payload,callback:I.callback,next:null},le===null?(te=le=ye,B=ue):le=le.next=ye,R|=se;if(I=I.next,I===null){if(I=x.shared.pending,I===null)break;se=I,I=se.next,se.next=null,x.lastBaseUpdate=se,x.shared.pending=null}}while(!0);if(le===null&&(B=ue),x.baseState=B,x.firstBaseUpdate=te,x.lastBaseUpdate=le,u=x.shared.interleaved,u!==null){x=u;do R|=x.lane,x=x.next;while(x!==u)}else _===null&&(x.shared.lanes=0);ko|=R,a.lanes=R,a.memoizedState=ue}}function yO(a,u,d){if(a=u.effects,u.effects=null,a!==null)for(u=0;ud?d:4,a(!0);var m=iy.transition;iy.transition={};try{a(!1),u()}finally{nt=d,iy.transition=m}}function IO(){return Gn().memoizedState}function TU(a,u,d){var m=Bi(a);if(d={lane:m,action:d,hasEagerState:!1,eagerState:null,next:null},DO(a))LO(u,d);else if(d=hO(a,u,d,m),d!==null){var x=vn();yr(d,a,m,x),$O(d,u,m)}}function CU(a,u,d){var m=Bi(a),x={lane:m,action:d,hasEagerState:!1,eagerState:null,next:null};if(DO(a))LO(u,x);else{var _=a.alternate;if(a.lanes===0&&(_===null||_.lanes===0)&&(_=u.lastRenderedReducer,_!==null))try{var R=u.lastRenderedState,I=_(R,d);if(x.hasEagerState=!0,x.eagerState=I,fr(I,R)){var B=u.interleaved;B===null?(x.next=x,Zm(u)):(x.next=B.next,B.next=x),u.interleaved=x;return}}catch{}finally{}d=hO(a,u,x,m),d!==null&&(x=vn(),yr(d,a,m,x),$O(d,u,m))}}function DO(a){var u=a.alternate;return a===vt||u!==null&&u===vt}function LO(a,u){Kl=Bf=!0;var d=a.pending;d===null?u.next=u:(u.next=d.next,d.next=u),a.pending=u}function $O(a,u,d){if((d&4194240)!==0){var m=u.lanes;m&=a.pendingLanes,d|=m,u.lanes=d,hm(a,d)}}var qf={readContext:Kn,useCallback:on,useContext:on,useEffect:on,useImperativeHandle:on,useInsertionEffect:on,useLayoutEffect:on,useMemo:on,useReducer:on,useRef:on,useState:on,useDebugValue:on,useDeferredValue:on,useTransition:on,useMutableSource:on,useSyncExternalStore:on,useId:on,unstable_isNewReconciler:!1},kU={readContext:Kn,useCallback:function(a,u){return Rr().memoizedState=[a,u===void 0?null:u],a},useContext:Kn,useEffect:EO,useImperativeHandle:function(a,u,d){return d=d!=null?d.concat([a]):null,Ff(4194308,4,kO.bind(null,u,a),d)},useLayoutEffect:function(a,u){return Ff(4194308,4,a,u)},useInsertionEffect:function(a,u){return Ff(4,2,a,u)},useMemo:function(a,u){var d=Rr();return u=u===void 0?null:u,a=a(),d.memoizedState=[a,u],a},useReducer:function(a,u,d){var m=Rr();return u=d!==void 0?d(u):u,m.memoizedState=m.baseState=u,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:u},m.queue=a,a=a.dispatch=TU.bind(null,vt,a),[m.memoizedState,a]},useRef:function(a){var u=Rr();return a={current:a},u.memoizedState=a},useState:OO,useDebugValue:fy,useDeferredValue:function(a){return Rr().memoizedState=a},useTransition:function(){var a=OO(!1),u=a[0];return a=EU.bind(null,a[1]),Rr().memoizedState=a,[u,a]},useMutableSource:function(){},useSyncExternalStore:function(a,u,d){var m=vt,x=Rr();if(pt){if(d===void 0)throw Error(n(407));d=d()}else{if(d=u(),qt===null)throw Error(n(349));(Co&30)!==0||xO(m,u,d)}x.memoizedState=d;var _={value:d,getSnapshot:u};return x.queue=_,EO(SO.bind(null,m,_,a),[a]),m.flags|=2048,Xl(9,wO.bind(null,m,_,d,u),void 0,null),d},useId:function(){var a=Rr(),u=qt.identifierPrefix;if(pt){var d=Yr,m=Xr;d=(m&~(1<<32-cr(m)-1)).toString(32)+d,u=":"+u+"R"+d,d=Gl++,0<\/script>",a=a.removeChild(a.firstChild)):typeof m.is=="string"?a=R.createElement(d,{is:m.is}):(a=R.createElement(d),d==="select"&&(R=a,m.multiple?R.multiple=!0:m.size&&(R.size=m.size))):a=R.createElementNS(a,d),a[Cr]=u,a[Ul]=m,iP(a,u,!1,!1),u.stateNode=a;e:{switch(R=rm(d,m),d){case"dialog":ct("cancel",a),ct("close",a),x=m;break;case"iframe":case"object":case"embed":ct("load",a),x=m;break;case"video":case"audio":for(x=0;x<$l.length;x++)ct($l[x],a);x=m;break;case"source":ct("error",a),x=m;break;case"img":case"image":case"link":ct("error",a),ct("load",a),x=m;break;case"details":ct("toggle",a),x=m;break;case"input":Ge(a,m),x=De(a,m),ct("invalid",a);break;case"option":x=m;break;case"select":a._wrapperState={wasMultiple:!!m.multiple},x=V({},m,{value:void 0}),ct("invalid",a);break;case"textarea":Ta(a,m),x=Kt(a,m),ct("invalid",a);break;default:x=m}nm(d,x),I=x;for(_ in I)if(I.hasOwnProperty(_)){var B=I[_];_==="style"?Q_(a,B):_==="dangerouslySetInnerHTML"?(B=B?B.__html:void 0,B!=null&&K_(a,B)):_==="children"?typeof B=="string"?(d!=="textarea"||B!=="")&&bl(a,B):typeof B=="number"&&bl(a,""+B):_!=="suppressContentEditableWarning"&&_!=="suppressHydrationWarning"&&_!=="autoFocus"&&(i.hasOwnProperty(_)?B!=null&&_==="onScroll"&&ct("scroll",a):B!=null&&O(a,_,B,R))}switch(d){case"input":Ce(a),Tt(a,m,!1);break;case"textarea":Ce(a),gl(a);break;case"option":m.value!=null&&a.setAttribute("value",""+Te(m.value));break;case"select":a.multiple=!!m.multiple,_=m.value,_!=null?nn(a,!!m.multiple,_,!1):m.defaultValue!=null&&nn(a,!!m.multiple,m.defaultValue,!0);break;default:typeof x.onClick=="function"&&(a.onclick=Af)}switch(d){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}}m&&(u.flags|=4)}u.ref!==null&&(u.flags|=512,u.flags|=2097152)}return an(u),null;case 6:if(a&&u.stateNode!=null)aP(a,u,a.memoizedProps,m);else{if(typeof m!="string"&&u.stateNode===null)throw Error(n(166));if(d=To(Hl.current),To(kr.current),Rf(u)){if(m=u.stateNode,d=u.memoizedProps,m[Cr]=u,(_=m.nodeValue!==d)&&(a=In,a!==null))switch(a.tag){case 3:_f(m.nodeValue,d,(a.mode&1)!==0);break;case 5:a.memoizedProps.suppressHydrationWarning!==!0&&_f(m.nodeValue,d,(a.mode&1)!==0)}_&&(u.flags|=4)}else m=(d.nodeType===9?d:d.ownerDocument).createTextNode(m),m[Cr]=u,u.stateNode=m}return an(u),null;case 13:if(ft(yt),m=u.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(pt&&Dn!==null&&(u.mode&1)!==0&&(u.flags&128)===0)uO(),za(),u.flags|=98560,_=!1;else if(_=Rf(u),m!==null&&m.dehydrated!==null){if(a===null){if(!_)throw Error(n(318));if(_=u.memoizedState,_=_!==null?_.dehydrated:null,!_)throw Error(n(317));_[Cr]=u}else za(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;an(u),_=!1}else dr!==null&&(My(dr),dr=null),_=!0;if(!_)return u.flags&65536?u:null}return(u.flags&128)!==0?(u.lanes=d,u):(m=m!==null,m!==(a!==null&&a.memoizedState!==null)&&m&&(u.child.flags|=8192,(u.mode&1)!==0&&(a===null||(yt.current&1)!==0?Nt===0&&(Nt=3):Dy())),u.updateQueue!==null&&(u.flags|=4),an(u),null);case 4:return Ka(),Sy(a,u),a===null&&Bl(u.stateNode.containerInfo),an(u),null;case 10:return Xm(u.type._context),an(u),null;case 17:return Sn(u.type)&&Pf(),an(u),null;case 19:if(ft(yt),_=u.memoizedState,_===null)return an(u),null;if(m=(u.flags&128)!==0,R=_.rendering,R===null)if(m)Yl(_,!1);else{if(Nt!==0||a!==null&&(a.flags&128)!==0)for(a=u.child;a!==null;){if(R=Lf(a),R!==null){for(u.flags|=128,Yl(_,!1),m=R.updateQueue,m!==null&&(u.updateQueue=m,u.flags|=4),u.subtreeFlags=0,m=d,d=u.child;d!==null;)_=d,a=m,_.flags&=14680066,R=_.alternate,R===null?(_.childLanes=0,_.lanes=a,_.child=null,_.subtreeFlags=0,_.memoizedProps=null,_.memoizedState=null,_.updateQueue=null,_.dependencies=null,_.stateNode=null):(_.childLanes=R.childLanes,_.lanes=R.lanes,_.child=R.child,_.subtreeFlags=0,_.deletions=null,_.memoizedProps=R.memoizedProps,_.memoizedState=R.memoizedState,_.updateQueue=R.updateQueue,_.type=R.type,a=R.dependencies,_.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),d=d.sibling;return lt(yt,yt.current&1|2),u.child}a=a.sibling}_.tail!==null&&At()>Ya&&(u.flags|=128,m=!0,Yl(_,!1),u.lanes=4194304)}else{if(!m)if(a=Lf(R),a!==null){if(u.flags|=128,m=!0,d=a.updateQueue,d!==null&&(u.updateQueue=d,u.flags|=4),Yl(_,!0),_.tail===null&&_.tailMode==="hidden"&&!R.alternate&&!pt)return an(u),null}else 2*At()-_.renderingStartTime>Ya&&d!==1073741824&&(u.flags|=128,m=!0,Yl(_,!1),u.lanes=4194304);_.isBackwards?(R.sibling=u.child,u.child=R):(d=_.last,d!==null?d.sibling=R:u.child=R,_.last=R)}return _.tail!==null?(u=_.tail,_.rendering=u,_.tail=u.sibling,_.renderingStartTime=At(),u.sibling=null,d=yt.current,lt(yt,m?d&1|2:d&1),u):(an(u),null);case 22:case 23:return Iy(),m=u.memoizedState!==null,a!==null&&a.memoizedState!==null!==m&&(u.flags|=8192),m&&(u.mode&1)!==0?(Ln&1073741824)!==0&&(an(u),u.subtreeFlags&6&&(u.flags|=8192)):an(u),null;case 24:return null;case 25:return null}throw Error(n(156,u.tag))}function $U(a,u){switch(Vm(u),u.tag){case 1:return Sn(u.type)&&Pf(),a=u.flags,a&65536?(u.flags=a&-65537|128,u):null;case 3:return Ka(),ft(wn),ft(rn),ry(),a=u.flags,(a&65536)!==0&&(a&128)===0?(u.flags=a&-65537|128,u):null;case 5:return ty(u),null;case 13:if(ft(yt),a=u.memoizedState,a!==null&&a.dehydrated!==null){if(u.alternate===null)throw Error(n(340));za()}return a=u.flags,a&65536?(u.flags=a&-65537|128,u):null;case 19:return ft(yt),null;case 4:return Ka(),null;case 10:return Xm(u.type._context),null;case 22:case 23:return Iy(),null;case 24:return null;default:return null}}var Hf=!1,sn=!1,BU=typeof WeakSet=="function"?WeakSet:Set,ge=null;function Qa(a,u){var d=a.ref;if(d!==null)if(typeof d=="function")try{d(null)}catch(m){xt(a,u,m)}else d.current=null}function _y(a,u,d){try{d()}catch(m){xt(a,u,m)}}var sP=!1;function FU(a,u){if(Im=df,a=BA(),Em(a)){if("selectionStart"in a)var d={start:a.selectionStart,end:a.selectionEnd};else e:{d=(d=a.ownerDocument)&&d.defaultView||window;var m=d.getSelection&&d.getSelection();if(m&&m.rangeCount!==0){d=m.anchorNode;var x=m.anchorOffset,_=m.focusNode;m=m.focusOffset;try{d.nodeType,_.nodeType}catch{d=null;break e}var R=0,I=-1,B=-1,te=0,le=0,ue=a,se=null;t:for(;;){for(var ye;ue!==d||x!==0&&ue.nodeType!==3||(I=R+x),ue!==_||m!==0&&ue.nodeType!==3||(B=R+m),ue.nodeType===3&&(R+=ue.nodeValue.length),(ye=ue.firstChild)!==null;)se=ue,ue=ye;for(;;){if(ue===a)break t;if(se===d&&++te===x&&(I=R),se===_&&++le===m&&(B=R),(ye=ue.nextSibling)!==null)break;ue=se,se=ue.parentNode}ue=ye}d=I===-1||B===-1?null:{start:I,end:B}}else d=null}d=d||{start:0,end:0}}else d=null;for(Dm={focusedElem:a,selectionRange:d},df=!1,ge=u;ge!==null;)if(u=ge,a=u.child,(u.subtreeFlags&1028)!==0&&a!==null)a.return=u,ge=a;else for(;ge!==null;){u=ge;try{var we=u.alternate;if((u.flags&1024)!==0)switch(u.tag){case 0:case 11:case 15:break;case 1:if(we!==null){var Ae=we.memoizedProps,Ot=we.memoizedState,Y=u.stateNode,W=Y.getSnapshotBeforeUpdate(u.elementType===u.type?Ae:hr(u.type,Ae),Ot);Y.__reactInternalSnapshotBeforeUpdate=W}break;case 3:var Z=u.stateNode.containerInfo;Z.nodeType===1?Z.textContent="":Z.nodeType===9&&Z.documentElement&&Z.removeChild(Z.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(fe){xt(u,u.return,fe)}if(a=u.sibling,a!==null){a.return=u.return,ge=a;break}ge=u.return}return we=sP,sP=!1,we}function Zl(a,u,d){var m=u.updateQueue;if(m=m!==null?m.lastEffect:null,m!==null){var x=m=m.next;do{if((x.tag&a)===a){var _=x.destroy;x.destroy=void 0,_!==void 0&&_y(u,d,_)}x=x.next}while(x!==m)}}function Kf(a,u){if(u=u.updateQueue,u=u!==null?u.lastEffect:null,u!==null){var d=u=u.next;do{if((d.tag&a)===a){var m=d.create;d.destroy=m()}d=d.next}while(d!==u)}}function Ay(a){var u=a.ref;if(u!==null){var d=a.stateNode;switch(a.tag){case 5:a=d;break;default:a=d}typeof u=="function"?u(a):u.current=a}}function lP(a){var u=a.alternate;u!==null&&(a.alternate=null,lP(u)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(u=a.stateNode,u!==null&&(delete u[Cr],delete u[Ul],delete u[Fm],delete u[SU],delete u[_U])),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}function uP(a){return a.tag===5||a.tag===3||a.tag===4}function cP(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||uP(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function Oy(a,u,d){var m=a.tag;if(m===5||m===6)a=a.stateNode,u?d.nodeType===8?d.parentNode.insertBefore(a,u):d.insertBefore(a,u):(d.nodeType===8?(u=d.parentNode,u.insertBefore(a,d)):(u=d,u.appendChild(a)),d=d._reactRootContainer,d!=null||u.onclick!==null||(u.onclick=Af));else if(m!==4&&(a=a.child,a!==null))for(Oy(a,u,d),a=a.sibling;a!==null;)Oy(a,u,d),a=a.sibling}function Py(a,u,d){var m=a.tag;if(m===5||m===6)a=a.stateNode,u?d.insertBefore(a,u):d.appendChild(a);else if(m!==4&&(a=a.child,a!==null))for(Py(a,u,d),a=a.sibling;a!==null;)Py(a,u,d),a=a.sibling}var Gt=null,pr=!1;function Di(a,u,d){for(d=d.child;d!==null;)fP(a,u,d),d=d.sibling}function fP(a,u,d){if(Tr&&typeof Tr.onCommitFiberUnmount=="function")try{Tr.onCommitFiberUnmount(af,d)}catch{}switch(d.tag){case 5:sn||Qa(d,u);case 6:var m=Gt,x=pr;Gt=null,Di(a,u,d),Gt=m,pr=x,Gt!==null&&(pr?(a=Gt,d=d.stateNode,a.nodeType===8?a.parentNode.removeChild(d):a.removeChild(d)):Gt.removeChild(d.stateNode));break;case 18:Gt!==null&&(pr?(a=Gt,d=d.stateNode,a.nodeType===8?Bm(a.parentNode,d):a.nodeType===1&&Bm(a,d),kl(a)):Bm(Gt,d.stateNode));break;case 4:m=Gt,x=pr,Gt=d.stateNode.containerInfo,pr=!0,Di(a,u,d),Gt=m,pr=x;break;case 0:case 11:case 14:case 15:if(!sn&&(m=d.updateQueue,m!==null&&(m=m.lastEffect,m!==null))){x=m=m.next;do{var _=x,R=_.destroy;_=_.tag,R!==void 0&&((_&2)!==0||(_&4)!==0)&&_y(d,u,R),x=x.next}while(x!==m)}Di(a,u,d);break;case 1:if(!sn&&(Qa(d,u),m=d.stateNode,typeof m.componentWillUnmount=="function"))try{m.props=d.memoizedProps,m.state=d.memoizedState,m.componentWillUnmount()}catch(I){xt(d,u,I)}Di(a,u,d);break;case 21:Di(a,u,d);break;case 22:d.mode&1?(sn=(m=sn)||d.memoizedState!==null,Di(a,u,d),sn=m):Di(a,u,d);break;default:Di(a,u,d)}}function dP(a){var u=a.updateQueue;if(u!==null){a.updateQueue=null;var d=a.stateNode;d===null&&(d=a.stateNode=new BU),u.forEach(function(m){var x=QU.bind(null,a,m);d.has(m)||(d.add(m),m.then(x,x))})}}function mr(a,u){var d=u.deletions;if(d!==null)for(var m=0;mx&&(x=R),m&=~_}if(m=x,m=At()-m,m=(120>m?120:480>m?480:1080>m?1080:1920>m?1920:3e3>m?3e3:4320>m?4320:1960*qU(m/1960))-m,10a?16:a,$i===null)var m=!1;else{if(a=$i,$i=null,Zf=0,(Ke&6)!==0)throw Error(n(331));var x=Ke;for(Ke|=4,ge=a.current;ge!==null;){var _=ge,R=_.child;if((ge.flags&16)!==0){var I=_.deletions;if(I!==null){for(var B=0;BAt()-Cy?jo(a,0):Ty|=d),On(a,u)}function OP(a,u){u===0&&((a.mode&1)===0?u=1:(u=lf,lf<<=1,(lf&130023424)===0&&(lf=4194304)));var d=vn();a=Zr(a,u),a!==null&&(Ol(a,u,d),On(a,d))}function GU(a){var u=a.memoizedState,d=0;u!==null&&(d=u.retryLane),OP(a,d)}function QU(a,u){var d=0;switch(a.tag){case 13:var m=a.stateNode,x=a.memoizedState;x!==null&&(d=x.retryLane);break;case 19:m=a.stateNode;break;default:throw Error(n(314))}m!==null&&m.delete(u),OP(a,d)}var PP;PP=function(a,u,d){if(a!==null)if(a.memoizedProps!==u.pendingProps||wn.current)_n=!0;else{if((a.lanes&d)===0&&(u.flags&128)===0)return _n=!1,DU(a,u,d);_n=(a.flags&131072)!==0}else _n=!1,pt&&(u.flags&1048576)!==0&&oO(u,kf,u.index);switch(u.lanes=0,u.tag){case 2:var m=u.type;Wf(a,u),a=u.pendingProps;var x=Fa(u,rn.current);Ha(u,d),x=ay(null,u,m,a,x,d);var _=sy();return u.flags|=1,typeof x=="object"&&x!==null&&typeof x.render=="function"&&x.$$typeof===void 0?(u.tag=1,u.memoizedState=null,u.updateQueue=null,Sn(m)?(_=!0,Ef(u)):_=!1,u.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,Jm(u),x.updater=zf,u.stateNode=x,x._reactInternals=u,hy(u,m,a,d),u=vy(null,u,m,!0,_,d)):(u.tag=0,pt&&_&&zm(u),yn(null,u,x,d),u=u.child),u;case 16:m=u.elementType;e:{switch(Wf(a,u),a=u.pendingProps,x=m._init,m=x(m._payload),u.type=m,x=u.tag=YU(m),a=hr(m,a),x){case 0:u=yy(null,u,m,a,d);break e;case 1:u=ZO(null,u,m,a,d);break e;case 11:u=KO(null,u,m,a,d);break e;case 14:u=GO(null,u,m,hr(m.type,a),d);break e}throw Error(n(306,m,""))}return u;case 0:return m=u.type,x=u.pendingProps,x=u.elementType===m?x:hr(m,x),yy(a,u,m,x,d);case 1:return m=u.type,x=u.pendingProps,x=u.elementType===m?x:hr(m,x),ZO(a,u,m,x,d);case 3:e:{if(JO(u),a===null)throw Error(n(387));m=u.pendingProps,_=u.memoizedState,x=_.element,pO(a,u),Df(u,m,null,d);var R=u.memoizedState;if(m=R.element,_.isDehydrated)if(_={element:m,isDehydrated:!1,cache:R.cache,pendingSuspenseBoundaries:R.pendingSuspenseBoundaries,transitions:R.transitions},u.updateQueue.baseState=_,u.memoizedState=_,u.flags&256){x=Ga(Error(n(423)),u),u=eP(a,u,m,d,x);break e}else if(m!==x){x=Ga(Error(n(424)),u),u=eP(a,u,m,d,x);break e}else for(Dn=ki(u.stateNode.containerInfo.firstChild),In=u,pt=!0,dr=null,d=dO(u,null,m,d),u.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(za(),m===x){u=ei(a,u,d);break e}yn(a,u,m,d)}u=u.child}return u;case 5:return vO(u),a===null&&Hm(u),m=u.type,x=u.pendingProps,_=a!==null?a.memoizedProps:null,R=x.children,Lm(m,x)?R=null:_!==null&&Lm(m,_)&&(u.flags|=32),YO(a,u),yn(a,u,R,d),u.child;case 6:return a===null&&Hm(u),null;case 13:return tP(a,u,d);case 4:return ey(u,u.stateNode.containerInfo),m=u.pendingProps,a===null?u.child=Va(u,null,m,d):yn(a,u,m,d),u.child;case 11:return m=u.type,x=u.pendingProps,x=u.elementType===m?x:hr(m,x),KO(a,u,m,x,d);case 7:return yn(a,u,u.pendingProps,d),u.child;case 8:return yn(a,u,u.pendingProps.children,d),u.child;case 12:return yn(a,u,u.pendingProps.children,d),u.child;case 10:e:{if(m=u.type._context,x=u.pendingProps,_=u.memoizedProps,R=x.value,lt(Mf,m._currentValue),m._currentValue=R,_!==null)if(fr(_.value,R)){if(_.children===x.children&&!wn.current){u=ei(a,u,d);break e}}else for(_=u.child,_!==null&&(_.return=u);_!==null;){var I=_.dependencies;if(I!==null){R=_.child;for(var B=I.firstContext;B!==null;){if(B.context===m){if(_.tag===1){B=Jr(-1,d&-d),B.tag=2;var te=_.updateQueue;if(te!==null){te=te.shared;var le=te.pending;le===null?B.next=B:(B.next=le.next,le.next=B),te.pending=B}}_.lanes|=d,B=_.alternate,B!==null&&(B.lanes|=d),Ym(_.return,d,u),I.lanes|=d;break}B=B.next}}else if(_.tag===10)R=_.type===u.type?null:_.child;else if(_.tag===18){if(R=_.return,R===null)throw Error(n(341));R.lanes|=d,I=R.alternate,I!==null&&(I.lanes|=d),Ym(R,d,u),R=_.sibling}else R=_.child;if(R!==null)R.return=_;else for(R=_;R!==null;){if(R===u){R=null;break}if(_=R.sibling,_!==null){_.return=R.return,R=_;break}R=R.return}_=R}yn(a,u,x.children,d),u=u.child}return u;case 9:return x=u.type,m=u.pendingProps.children,Ha(u,d),x=Kn(x),m=m(x),u.flags|=1,yn(a,u,m,d),u.child;case 14:return m=u.type,x=hr(m,u.pendingProps),x=hr(m.type,x),GO(a,u,m,x,d);case 15:return QO(a,u,u.type,u.pendingProps,d);case 17:return m=u.type,x=u.pendingProps,x=u.elementType===m?x:hr(m,x),Wf(a,u),u.tag=1,Sn(m)?(a=!0,Ef(u)):a=!1,Ha(u,d),FO(u,m,x),hy(u,m,x,d),vy(null,u,m,!0,a,d);case 19:return rP(a,u,d);case 22:return XO(a,u,d)}throw Error(n(156,u.tag))};function EP(a,u){return aA(a,u)}function XU(a,u,d,m){this.tag=a,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xn(a,u,d,m){return new XU(a,u,d,m)}function Ly(a){return a=a.prototype,!(!a||!a.isReactComponent)}function YU(a){if(typeof a=="function")return Ly(a)?1:0;if(a!=null){if(a=a.$$typeof,a===$)return 11;if(a===X)return 14}return 2}function Ui(a,u){var d=a.alternate;return d===null?(d=Xn(a.tag,u,a.key,a.mode),d.elementType=a.elementType,d.type=a.type,d.stateNode=a.stateNode,d.alternate=a,a.alternate=d):(d.pendingProps=u,d.type=a.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=a.flags&14680064,d.childLanes=a.childLanes,d.lanes=a.lanes,d.child=a.child,d.memoizedProps=a.memoizedProps,d.memoizedState=a.memoizedState,d.updateQueue=a.updateQueue,u=a.dependencies,d.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},d.sibling=a.sibling,d.index=a.index,d.ref=a.ref,d}function nd(a,u,d,m,x,_){var R=2;if(m=a,typeof a=="function")Ly(a)&&(R=1);else if(typeof a=="string")R=5;else e:switch(a){case k:return No(d.children,x,_,u);case j:R=8,x|=8;break;case N:return a=Xn(12,d,u,x|2),a.elementType=N,a.lanes=_,a;case G:return a=Xn(13,d,u,x),a.elementType=G,a.lanes=_,a;case F:return a=Xn(19,d,u,x),a.elementType=F,a.lanes=_,a;case ee:return rd(d,x,_,u);default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case U:R=10;break e;case L:R=9;break e;case $:R=11;break e;case X:R=14;break e;case J:R=16,m=null;break e}throw Error(n(130,a==null?a:typeof a,""))}return u=Xn(R,d,u,x),u.elementType=a,u.type=m,u.lanes=_,u}function No(a,u,d,m){return a=Xn(7,a,m,u),a.lanes=d,a}function rd(a,u,d,m){return a=Xn(22,a,m,u),a.elementType=ee,a.lanes=d,a.stateNode={isHidden:!1},a}function $y(a,u,d){return a=Xn(6,a,null,u),a.lanes=d,a}function By(a,u,d){return u=Xn(4,a.children!==null?a.children:[],a.key,u),u.lanes=d,u.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},u}function ZU(a,u,d,m,x){this.tag=u,this.containerInfo=a,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=dm(0),this.expirationTimes=dm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dm(0),this.identifierPrefix=m,this.onRecoverableError=x,this.mutableSourceEagerHydrationData=null}function Fy(a,u,d,m,x,_,R,I,B){return a=new ZU(a,u,d,I,B),u===1?(u=1,_===!0&&(u|=8)):u=0,_=Xn(3,null,null,u),a.current=_,_.stateNode=a,_.memoizedState={element:m,isDehydrated:d,cache:null,transitions:null,pendingSuspenseBoundaries:null},Jm(_),a}function JU(a,u,d){var m=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Ky.exports=hq(),Ky.exports}var qP;function pq(){if(qP)return dd;qP=1;var e=gI();return dd.createRoot=e.createRoot,dd.hydrateRoot=e.hydrateRoot,dd}var mq=pq();const yq=rt(mq),vq=20,gq=1e6,si={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let Xy=0;function bq(){return Xy=(Xy+1)%Number.MAX_VALUE,Xy.toString()}const Yy=new Map,zP=e=>{if(Yy.has(e))return;const t=setTimeout(()=>{Yy.delete(e),Cu({type:si.REMOVE_TOAST,toastId:e})},gq);Yy.set(e,t)},xq=(e,t)=>{switch(t.type){case si.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,vq)};case si.UPDATE_TOAST:return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case si.DISMISS_TOAST:{const{toastId:n}=t;return n?zP(n):e.toasts.forEach(r=>{zP(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case si.REMOVE_TOAST:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},$d=[];let Bd={toasts:[]};function Cu(e){Bd=xq(Bd,e),$d.forEach(t=>{t(Bd)})}function wq({...e}){const t=bq(),n=i=>Cu({type:si.UPDATE_TOAST,toast:{...i,id:t}}),r=()=>Cu({type:si.DISMISS_TOAST,toastId:t});return Cu({type:si.ADD_TOAST,toast:{...e,id:t,open:!0,onOpenChange:i=>{i||r()}}}),{id:t,dismiss:r,update:n}}function Sq(){const[e,t]=M.useState(Bd);return M.useEffect(()=>($d.push(t),()=>{const n=$d.indexOf(t);n>-1&&$d.splice(n,1)}),[e]),{...e,toast:wq,dismiss:n=>Cu({type:si.DISMISS_TOAST,toastId:n})}}var D1=gI();const _q=rt(D1);function Fn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function VP(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function L1(...e){return t=>{let n=!1;const r=e.map(i=>{const o=VP(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i{var w;const{scope:y,children:g,...S}=p,b=((w=y==null?void 0:y[e])==null?void 0:w[c])||l,v=M.useMemo(()=>S,Object.values(S));return E.jsx(b.Provider,{value:v,children:g})};f.displayName=o+"Provider";function h(p,y){var b;const g=((b=y==null?void 0:y[e])==null?void 0:b[c])||l,S=M.useContext(g);if(S)return S;if(s!==void 0)return s;throw new Error(`\`${p}\` must be used within \`${o}\``)}return[f,h]}const i=()=>{const o=n.map(s=>M.createContext(s));return function(l){const c=(l==null?void 0:l[e])||o;return M.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[r,Aq(i,...t)]}function Aq(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((l,{useScope:c,scopeName:f})=>{const p=c(o)[`__scope${f}`];return{...l,...p}},{});return M.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function WP(e){const t=Oq(e),n=M.forwardRef((r,i)=>{const{children:o,...s}=r,l=M.Children.toArray(o),c=l.find(Eq);if(c){const f=c.props.children,h=l.map(p=>p===c?M.Children.count(f)>1?M.Children.only(null):M.isValidElement(f)?f.props.children:null:p);return E.jsx(t,{...s,ref:i,children:M.isValidElement(f)?M.cloneElement(f,void 0,h):null})}return E.jsx(t,{...s,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}function Oq(e){const t=M.forwardRef((n,r)=>{const{children:i,...o}=n;if(M.isValidElement(i)){const s=Cq(i),l=Tq(o,i.props);return i.type!==M.Fragment&&(l.ref=r?L1(r,s):s),M.cloneElement(i,l)}return M.Children.count(i)>1?M.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Pq=Symbol("radix.slottable");function Eq(e){return M.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Pq}function Tq(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...l)=>{const c=o(...l);return i(...l),c}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function Cq(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function kq(e){const t=e+"CollectionProvider",[n,r]=bI(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=b=>{const{scope:v,children:w}=b,A=z.useRef(null),O=z.useRef(new Map).current;return E.jsx(i,{scope:v,itemMap:O,collectionRef:A,children:w})};s.displayName=t;const l=e+"CollectionSlot",c=WP(l),f=z.forwardRef((b,v)=>{const{scope:w,children:A}=b,O=o(l,w),T=da(v,O.collectionRef);return E.jsx(c,{ref:T,children:A})});f.displayName=l;const h=e+"CollectionItemSlot",p="data-radix-collection-item",y=WP(h),g=z.forwardRef((b,v)=>{const{scope:w,children:A,...O}=b,T=z.useRef(null),P=da(v,T),C=o(h,w);return z.useEffect(()=>(C.itemMap.set(T,{ref:T,...O}),()=>void C.itemMap.delete(T))),E.jsx(y,{[p]:"",ref:P,children:A})});g.displayName=h;function S(b){const v=o(e+"CollectionConsumer",b);return z.useCallback(()=>{const A=v.collectionRef.current;if(!A)return[];const O=Array.from(A.querySelectorAll(`[${p}]`));return Array.from(v.itemMap.values()).sort((C,k)=>O.indexOf(C.ref.current)-O.indexOf(k.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:f,ItemSlot:g},S,r]}function Rq(e){const t=jq(e),n=M.forwardRef((r,i)=>{const{children:o,...s}=r,l=M.Children.toArray(o),c=l.find(Nq);if(c){const f=c.props.children,h=l.map(p=>p===c?M.Children.count(f)>1?M.Children.only(null):M.isValidElement(f)?f.props.children:null:p);return E.jsx(t,{...s,ref:i,children:M.isValidElement(f)?M.cloneElement(f,void 0,h):null})}return E.jsx(t,{...s,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}function jq(e){const t=M.forwardRef((n,r)=>{const{children:i,...o}=n;if(M.isValidElement(i)){const s=Dq(i),l=Iq(o,i.props);return i.type!==M.Fragment&&(l.ref=r?L1(r,s):s),M.cloneElement(i,l)}return M.Children.count(i)>1?M.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Mq=Symbol("radix.slottable");function Nq(e){return M.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Mq}function Iq(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...l)=>{const c=o(...l);return i(...l),c}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function Dq(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Lq=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Hr=Lq.reduce((e,t)=>{const n=Rq(`Primitive.${t}`),r=M.forwardRef((i,o)=>{const{asChild:s,...l}=i,c=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(c,{...l,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function xI(e,t){e&&D1.flushSync(()=>e.dispatchEvent(t))}function ha(e){const t=M.useRef(e);return M.useEffect(()=>{t.current=e}),M.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function $q(e,t=globalThis==null?void 0:globalThis.document){const n=ha(e);M.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Bq="DismissableLayer",Ox="dismissableLayer.update",Fq="dismissableLayer.pointerDownOutside",Uq="dismissableLayer.focusOutside",HP,wI=M.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),SI=M.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:s,onDismiss:l,...c}=e,f=M.useContext(wI),[h,p]=M.useState(null),y=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=M.useState({}),S=da(t,k=>p(k)),b=Array.from(f.layers),[v]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),w=b.indexOf(v),A=h?b.indexOf(h):-1,O=f.layersWithOutsidePointerEventsDisabled.size>0,T=A>=w,P=zq(k=>{const j=k.target,N=[...f.branches].some(U=>U.contains(j));!T||N||(i==null||i(k),s==null||s(k),k.defaultPrevented||l==null||l())},y),C=Vq(k=>{const j=k.target;[...f.branches].some(U=>U.contains(j))||(o==null||o(k),s==null||s(k),k.defaultPrevented||l==null||l())},y);return $q(k=>{A===f.layers.size-1&&(r==null||r(k),!k.defaultPrevented&&l&&(k.preventDefault(),l()))},y),M.useEffect(()=>{if(h)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(HP=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(h)),f.layers.add(h),KP(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=HP)}},[h,y,n,f]),M.useEffect(()=>()=>{h&&(f.layers.delete(h),f.layersWithOutsidePointerEventsDisabled.delete(h),KP())},[h,f]),M.useEffect(()=>{const k=()=>g({});return document.addEventListener(Ox,k),()=>document.removeEventListener(Ox,k)},[]),E.jsx(Hr.div,{...c,ref:S,style:{pointerEvents:O?T?"auto":"none":void 0,...e.style},onFocusCapture:Fn(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Fn(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Fn(e.onPointerDownCapture,P.onPointerDownCapture)})});SI.displayName=Bq;var qq="DismissableLayerBranch",_I=M.forwardRef((e,t)=>{const n=M.useContext(wI),r=M.useRef(null),i=da(t,r);return M.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),E.jsx(Hr.div,{...e,ref:i})});_I.displayName=qq;function zq(e,t=globalThis==null?void 0:globalThis.document){const n=ha(e),r=M.useRef(!1),i=M.useRef(()=>{});return M.useEffect(()=>{const o=l=>{if(l.target&&!r.current){let c=function(){AI(Fq,n,f,{discrete:!0})};const f={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=c,t.addEventListener("click",i.current,{once:!0})):c()}else t.removeEventListener("click",i.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Vq(e,t=globalThis==null?void 0:globalThis.document){const n=ha(e),r=M.useRef(!1);return M.useEffect(()=>{const i=o=>{o.target&&!r.current&&AI(Uq,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function KP(){const e=new CustomEvent(Ox);document.dispatchEvent(e)}function AI(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?xI(i,o):i.dispatchEvent(o)}var Wq=SI,Hq=_I,Fu=globalThis!=null&&globalThis.document?M.useLayoutEffect:()=>{},Kq="Portal",OI=M.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[i,o]=M.useState(!1);Fu(()=>o(!0),[]);const s=n||i&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return s?_q.createPortal(E.jsx(Hr.div,{...r,ref:t}),s):null});OI.displayName=Kq;function Gq(e,t){return M.useReducer((n,r)=>t[n][r]??n,e)}var PI=e=>{const{present:t,children:n}=e,r=Qq(t),i=typeof n=="function"?n({present:r.isPresent}):M.Children.only(n),o=da(r.ref,Xq(i));return typeof n=="function"||r.isPresent?M.cloneElement(i,{ref:o}):null};PI.displayName="Presence";function Qq(e){const[t,n]=M.useState(),r=M.useRef(null),i=M.useRef(e),o=M.useRef("none"),s=e?"mounted":"unmounted",[l,c]=Gq(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return M.useEffect(()=>{const f=hd(r.current);o.current=l==="mounted"?f:"none"},[l]),Fu(()=>{const f=r.current,h=i.current;if(h!==e){const y=o.current,g=hd(f);e?c("MOUNT"):g==="none"||(f==null?void 0:f.display)==="none"?c("UNMOUNT"):c(h&&y!==g?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),Fu(()=>{if(t){let f;const h=t.ownerDocument.defaultView??window,p=g=>{const b=hd(r.current).includes(CSS.escape(g.animationName));if(g.target===t&&b&&(c("ANIMATION_END"),!i.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",f=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},y=g=>{g.target===t&&(o.current=hd(r.current))};return t.addEventListener("animationstart",y),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{h.clearTimeout(f),t.removeEventListener("animationstart",y),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:M.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function hd(e){return(e==null?void 0:e.animationName)||"none"}function Xq(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Yq=vI[" useInsertionEffect ".trim().toString()]||Fu;function Zq({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,o,s]=Jq({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:i;{const h=M.useRef(e!==void 0);M.useEffect(()=>{const p=h.current;p!==l&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),h.current=l},[l,r])}const f=M.useCallback(h=>{var p;if(l){const y=e5(h)?h(e):h;y!==e&&((p=s.current)==null||p.call(s,y))}else o(h)},[l,e,o,s]);return[c,f]}function Jq({defaultProp:e,onChange:t}){const[n,r]=M.useState(e),i=M.useRef(n),o=M.useRef(t);return Yq(()=>{o.current=t},[t]),M.useEffect(()=>{var s;i.current!==n&&((s=o.current)==null||s.call(o,n),i.current=n)},[n,i]),[n,r,o]}function e5(e){return typeof e=="function"}var t5=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),n5="VisuallyHidden",$1=M.forwardRef((e,t)=>E.jsx(Hr.span,{...e,ref:t,style:{...t5,...e.style}}));$1.displayName=n5;var B1="ToastProvider",[F1,r5,i5]=kq("Toast"),[EI]=bI("Toast",[i5]),[o5,up]=EI(B1),TI=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:i="right",swipeThreshold:o=50,children:s}=e,[l,c]=M.useState(null),[f,h]=M.useState(0),p=M.useRef(!1),y=M.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${B1}\`. Expected non-empty \`string\`.`),E.jsx(F1.Provider,{scope:t,children:E.jsx(o5,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:o,toastCount:f,viewport:l,onViewportChange:c,onToastAdd:M.useCallback(()=>h(g=>g+1),[]),onToastRemove:M.useCallback(()=>h(g=>g-1),[]),isFocusedToastEscapeKeyDownRef:p,isClosePausedRef:y,children:s})})};TI.displayName=B1;var CI="ToastViewport",a5=["F8"],Px="toast.viewportPause",Ex="toast.viewportResume",kI=M.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=a5,label:i="Notifications ({hotkey})",...o}=e,s=up(CI,n),l=r5(n),c=M.useRef(null),f=M.useRef(null),h=M.useRef(null),p=M.useRef(null),y=da(t,p,s.onViewportChange),g=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),S=s.toastCount>0;M.useEffect(()=>{const v=w=>{var O;r.length!==0&&r.every(T=>w[T]||w.code===T)&&((O=p.current)==null||O.focus())};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[r]),M.useEffect(()=>{const v=c.current,w=p.current;if(S&&v&&w){const A=()=>{if(!s.isClosePausedRef.current){const C=new CustomEvent(Px);w.dispatchEvent(C),s.isClosePausedRef.current=!0}},O=()=>{if(s.isClosePausedRef.current){const C=new CustomEvent(Ex);w.dispatchEvent(C),s.isClosePausedRef.current=!1}},T=C=>{!v.contains(C.relatedTarget)&&O()},P=()=>{v.contains(document.activeElement)||O()};return v.addEventListener("focusin",A),v.addEventListener("focusout",T),v.addEventListener("pointermove",A),v.addEventListener("pointerleave",P),window.addEventListener("blur",A),window.addEventListener("focus",O),()=>{v.removeEventListener("focusin",A),v.removeEventListener("focusout",T),v.removeEventListener("pointermove",A),v.removeEventListener("pointerleave",P),window.removeEventListener("blur",A),window.removeEventListener("focus",O)}}},[S,s.isClosePausedRef]);const b=M.useCallback(({tabbingDirection:v})=>{const A=l().map(O=>{const T=O.ref.current,P=[T,...b5(T)];return v==="forwards"?P:P.reverse()});return(v==="forwards"?A.reverse():A).flat()},[l]);return M.useEffect(()=>{const v=p.current;if(v){const w=A=>{var P,C,k;const O=A.altKey||A.ctrlKey||A.metaKey;if(A.key==="Tab"&&!O){const j=document.activeElement,N=A.shiftKey;if(A.target===v&&N){(P=f.current)==null||P.focus();return}const $=b({tabbingDirection:N?"backwards":"forwards"}),G=$.findIndex(F=>F===j);Zy($.slice(G+1))?A.preventDefault():N?(C=f.current)==null||C.focus():(k=h.current)==null||k.focus()}};return v.addEventListener("keydown",w),()=>v.removeEventListener("keydown",w)}},[l,b]),E.jsxs(Hq,{ref:c,role:"region","aria-label":i.replace("{hotkey}",g),tabIndex:-1,style:{pointerEvents:S?void 0:"none"},children:[S&&E.jsx(Tx,{ref:f,onFocusFromOutsideViewport:()=>{const v=b({tabbingDirection:"forwards"});Zy(v)}}),E.jsx(F1.Slot,{scope:n,children:E.jsx(Hr.ol,{tabIndex:-1,...o,ref:y})}),S&&E.jsx(Tx,{ref:h,onFocusFromOutsideViewport:()=>{const v=b({tabbingDirection:"backwards"});Zy(v)}})]})});kI.displayName=CI;var RI="ToastFocusProxy",Tx=M.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,o=up(RI,n);return E.jsx($1,{tabIndex:0,...i,ref:t,style:{position:"fixed"},onFocus:s=>{var f;const l=s.relatedTarget;!((f=o.viewport)!=null&&f.contains(l))&&r()}})});Tx.displayName=RI;var Dc="Toast",s5="toast.swipeStart",l5="toast.swipeMove",u5="toast.swipeCancel",c5="toast.swipeEnd",jI=M.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:i,onOpenChange:o,...s}=e,[l,c]=Zq({prop:r,defaultProp:i??!0,onChange:o,caller:Dc});return E.jsx(PI,{present:n||l,children:E.jsx(h5,{open:l,...s,ref:t,onClose:()=>c(!1),onPause:ha(e.onPause),onResume:ha(e.onResume),onSwipeStart:Fn(e.onSwipeStart,f=>{f.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Fn(e.onSwipeMove,f=>{const{x:h,y:p}=f.detail.delta;f.currentTarget.setAttribute("data-swipe","move"),f.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${h}px`),f.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${p}px`)}),onSwipeCancel:Fn(e.onSwipeCancel,f=>{f.currentTarget.setAttribute("data-swipe","cancel"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),f.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),f.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Fn(e.onSwipeEnd,f=>{const{x:h,y:p}=f.detail.delta;f.currentTarget.setAttribute("data-swipe","end"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),f.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${h}px`),f.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${p}px`),c(!1)})})})});jI.displayName=Dc;var[f5,d5]=EI(Dc,{onClose(){}}),h5=M.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:i,open:o,onClose:s,onEscapeKeyDown:l,onPause:c,onResume:f,onSwipeStart:h,onSwipeMove:p,onSwipeCancel:y,onSwipeEnd:g,...S}=e,b=up(Dc,n),[v,w]=M.useState(null),A=da(t,F=>w(F)),O=M.useRef(null),T=M.useRef(null),P=i||b.duration,C=M.useRef(0),k=M.useRef(P),j=M.useRef(0),{onToastAdd:N,onToastRemove:U}=b,L=ha(()=>{var X;(v==null?void 0:v.contains(document.activeElement))&&((X=b.viewport)==null||X.focus()),s()}),$=M.useCallback(F=>{!F||F===1/0||(window.clearTimeout(j.current),C.current=new Date().getTime(),j.current=window.setTimeout(L,F))},[L]);M.useEffect(()=>{const F=b.viewport;if(F){const X=()=>{$(k.current),f==null||f()},J=()=>{const ee=new Date().getTime()-C.current;k.current=k.current-ee,window.clearTimeout(j.current),c==null||c()};return F.addEventListener(Px,J),F.addEventListener(Ex,X),()=>{F.removeEventListener(Px,J),F.removeEventListener(Ex,X)}}},[b.viewport,P,c,f,$]),M.useEffect(()=>{o&&!b.isClosePausedRef.current&&$(P)},[o,P,b.isClosePausedRef,$]),M.useEffect(()=>(N(),()=>U()),[N,U]);const G=M.useMemo(()=>v?BI(v):null,[v]);return b.viewport?E.jsxs(E.Fragment,{children:[G&&E.jsx(p5,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:G}),E.jsx(f5,{scope:n,onClose:L,children:D1.createPortal(E.jsx(F1.ItemSlot,{scope:n,children:E.jsx(Wq,{asChild:!0,onEscapeKeyDown:Fn(l,()=>{b.isFocusedToastEscapeKeyDownRef.current||L(),b.isFocusedToastEscapeKeyDownRef.current=!1}),children:E.jsx(Hr.li,{tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":b.swipeDirection,...S,ref:A,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Fn(e.onKeyDown,F=>{F.key==="Escape"&&(l==null||l(F.nativeEvent),F.nativeEvent.defaultPrevented||(b.isFocusedToastEscapeKeyDownRef.current=!0,L()))}),onPointerDown:Fn(e.onPointerDown,F=>{F.button===0&&(O.current={x:F.clientX,y:F.clientY})}),onPointerMove:Fn(e.onPointerMove,F=>{if(!O.current)return;const X=F.clientX-O.current.x,J=F.clientY-O.current.y,ee=!!T.current,Q=["left","right"].includes(b.swipeDirection),ne=["left","up"].includes(b.swipeDirection)?Math.min:Math.max,V=Q?ne(0,X):0,D=Q?0:ne(0,J),K=F.pointerType==="touch"?10:2,ae={x:V,y:D},he={originalEvent:F,delta:ae};ee?(T.current=ae,pd(l5,p,he,{discrete:!1})):GP(ae,b.swipeDirection,K)?(T.current=ae,pd(s5,h,he,{discrete:!1}),F.target.setPointerCapture(F.pointerId)):(Math.abs(X)>K||Math.abs(J)>K)&&(O.current=null)}),onPointerUp:Fn(e.onPointerUp,F=>{const X=T.current,J=F.target;if(J.hasPointerCapture(F.pointerId)&&J.releasePointerCapture(F.pointerId),T.current=null,O.current=null,X){const ee=F.currentTarget,Q={originalEvent:F,delta:X};GP(X,b.swipeDirection,b.swipeThreshold)?pd(c5,g,Q,{discrete:!0}):pd(u5,y,Q,{discrete:!0}),ee.addEventListener("click",ne=>ne.preventDefault(),{once:!0})}})})})}),b.viewport)})]}):null}),p5=e=>{const{__scopeToast:t,children:n,...r}=e,i=up(Dc,t),[o,s]=M.useState(!1),[l,c]=M.useState(!1);return v5(()=>s(!0)),M.useEffect(()=>{const f=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(f)},[]),l?null:E.jsx(OI,{asChild:!0,children:E.jsx($1,{...r,children:o&&E.jsxs(E.Fragment,{children:[i.label," ",n]})})})},m5="ToastTitle",MI=M.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return E.jsx(Hr.div,{...r,ref:t})});MI.displayName=m5;var y5="ToastDescription",NI=M.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return E.jsx(Hr.div,{...r,ref:t})});NI.displayName=y5;var II="ToastAction",DI=M.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?E.jsx($I,{altText:n,asChild:!0,children:E.jsx(U1,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${II}\`. Expected non-empty \`string\`.`),null)});DI.displayName=II;var LI="ToastClose",U1=M.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,i=d5(LI,n);return E.jsx($I,{asChild:!0,children:E.jsx(Hr.button,{type:"button",...r,ref:t,onClick:Fn(e.onClick,i.onClose)})})});U1.displayName=LI;var $I=M.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...i}=e;return E.jsx(Hr.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...i,ref:t})});function BI(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),g5(r)){const i=r.ariaHidden||r.hidden||r.style.display==="none",o=r.dataset.radixToastAnnounceExclude==="";if(!i)if(o){const s=r.dataset.radixToastAnnounceAlt;s&&t.push(s)}else t.push(...BI(r))}}),t}function pd(e,t,n,{discrete:r}){const i=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?xI(i,o):i.dispatchEvent(o)}var GP=(e,t,n=0)=>{const r=Math.abs(e.x),i=Math.abs(e.y),o=r>i;return t==="left"||t==="right"?o&&r>n:!o&&i>n};function v5(e=()=>{}){const t=ha(e);Fu(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function g5(e){return e.nodeType===e.ELEMENT_NODE}function b5(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Zy(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var x5=TI,FI=kI,UI=jI,qI=MI,zI=NI,VI=DI,WI=U1;function HI(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;ttypeof e=="boolean"?`${e}`:e===0?"0":e,XP=We,w5=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return XP(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:o}=t,s=Object.keys(i).map(f=>{const h=n==null?void 0:n[f],p=o==null?void 0:o[f];if(h===null)return null;const y=QP(h)||QP(p);return i[f][y]}),l=n&&Object.entries(n).reduce((f,h)=>{let[p,y]=h;return y===void 0||(f[p]=y),f},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,h)=>{let{class:p,className:y,...g}=h;return Object.entries(g).every(S=>{let[b,v]=S;return Array.isArray(v)?v.includes({...o,...l}[b]):{...o,...l}[b]===v})?[...f,p,y]:f},[]);return XP(e,s,c,n==null?void 0:n.class,n==null?void 0:n.className)};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const S5=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),KI=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var _5={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const A5=M.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:s,...l},c)=>M.createElement("svg",{ref:c,..._5,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:KI("lucide",i),...l},[...s.map(([f,h])=>M.createElement(f,h)),...Array.isArray(o)?o:[o]]));/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const xn=(e,t)=>{const n=M.forwardRef(({className:r,...i},o)=>M.createElement(A5,{ref:o,iconNode:t,className:KI(`lucide-${S5(e)}`,r),...i}));return n.displayName=`${e}`,n};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const O5=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],q1=xn("ArrowRight",O5);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const P5=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],E5=xn("ChevronDown",P5);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const T5=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],C5=xn("CircleCheck",T5);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const k5=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],cp=xn("Download",k5);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const R5=[["path",{d:"m11 17 2 2a1 1 0 1 0 3-3",key:"efffak"}],["path",{d:"m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4",key:"9pr0kb"}],["path",{d:"m21 3 1 11h-2",key:"1tisrp"}],["path",{d:"M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3",key:"1uvwmv"}],["path",{d:"M3 4h8",key:"1ep09j"}]],j5=xn("Handshake",R5);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const M5=[["path",{d:"M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z",key:"nnexq3"}],["path",{d:"M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12",key:"mt58a7"}]],N5=xn("Leaf",M5);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const I5=[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]],D5=xn("Linkedin",I5);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const L5=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],$5=xn("MapPin",L5);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const B5=[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]],F5=xn("Menu",B5);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const U5=[["path",{d:"m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"7g6ntu"}],["path",{d:"m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"ijws7r"}],["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2",key:"3gwbw2"}]],q5=xn("Scale",U5);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const z5=[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]],V5=xn("TrendingUp",z5);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const W5=[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]],H5=xn("Twitter",W5);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const K5=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]],GI=xn("Users",K5);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const G5=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],QI=xn("X",G5);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Q5=[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]],X5=xn("Youtube",Q5),Y5=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r({classGroupId:e,validator:t}),XI=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Yd="-",YP=[],J5="arbitrary..",ez=e=>{const t=nz(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return tz(s);const l=s.split(Yd),c=l[0]===""&&l.length>1?1:0;return YI(l,c,t)},getConflictingClassGroupIds:(s,l)=>{if(l){const c=r[s],f=n[s];return c?f?Y5(f,c):c:f||YP}return n[s]||YP}}},YI=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],o=n.nextPart.get(i);if(o){const f=YI(e,t+1,o);if(f)return f}const s=n.validators;if(s===null)return;const l=t===0?e.join(Yd):e.slice(t).join(Yd),c=s.length;for(let f=0;fe.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?J5+r:void 0})(),nz=e=>{const{theme:t,classGroups:n}=e;return rz(n,t)},rz=(e,t)=>{const n=XI();for(const r in e){const i=e[r];z1(i,n,r,t)}return n},z1=(e,t,n,r)=>{const i=e.length;for(let o=0;o{if(typeof e=="string"){oz(e,t,n);return}if(typeof e=="function"){az(e,t,n,r);return}sz(e,t,n,r)},oz=(e,t,n)=>{const r=e===""?t:ZI(t,e);r.classGroupId=n},az=(e,t,n,r)=>{if(lz(e)){z1(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Z5(n,e))},sz=(e,t,n,r)=>{const i=Object.entries(e),o=i.length;for(let s=0;s{let n=e;const r=t.split(Yd),i=r.length;for(let o=0;o"isThemeGetter"in e&&e.isThemeGetter===!0,uz=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(o,s)=>{n[o]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(o){let s=n[o];if(s!==void 0)return s;if((s=r[o])!==void 0)return i(o,s),s},set(o,s){o in n?n[o]=s:i(o,s)}}},Cx="!",ZP=":",cz=[],JP=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),fz=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const o=[];let s=0,l=0,c=0,f;const h=i.length;for(let b=0;bc?f-c:void 0;return JP(o,g,y,S)};if(t){const i=t+ZP,o=r;r=s=>s.startsWith(i)?o(s.slice(i.length)):JP(cz,!1,s,void 0,!0)}if(n){const i=r;r=o=>n({className:o,parseClassName:i})}return r},dz=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let o=0;o0&&(i.sort(),r.push(...i),i=[]),r.push(s)):i.push(s)}return i.length>0&&(i.sort(),r.push(...i)),r}},hz=e=>({cache:uz(e.cacheSize),parseClassName:fz(e),sortModifiers:dz(e),...ez(e)}),pz=/\s+/,mz=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:o}=t,s=[],l=e.trim().split(pz);let c="";for(let f=l.length-1;f>=0;f-=1){const h=l[f],{isExternal:p,modifiers:y,hasImportantModifier:g,baseClassName:S,maybePostfixModifierPosition:b}=n(h);if(p){c=h+(c.length>0?" "+c:c);continue}let v=!!b,w=r(v?S.substring(0,b):S);if(!w){if(!v){c=h+(c.length>0?" "+c:c);continue}if(w=r(S),!w){c=h+(c.length>0?" "+c:c);continue}v=!1}const A=y.length===0?"":y.length===1?y[0]:o(y).join(":"),O=g?A+Cx:A,T=O+w;if(s.indexOf(T)>-1)continue;s.push(T);const P=i(w,v);for(let C=0;C0?" "+c:c)}return c},yz=(...e)=>{let t=0,n,r,i="";for(;t{if(typeof e=="string")return e;let t,n="";for(let r=0;r{let n,r,i,o;const s=c=>{const f=t.reduce((h,p)=>p(h),e());return n=hz(f),r=n.cache.get,i=n.cache.set,o=l,l(c)},l=c=>{const f=r(c);if(f)return f;const h=mz(c,n);return i(c,h),h};return o=s,(...c)=>o(yz(...c))},gz=[],It=e=>{const t=n=>n[e]||gz;return t.isThemeGetter=!0,t},eD=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,tD=/^\((?:(\w[\w-]*):)?(.+)\)$/i,bz=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,xz=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,wz=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Sz=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,_z=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Az=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,zi=e=>bz.test(e),$e=e=>!!e&&!Number.isNaN(Number(e)),Vi=e=>!!e&&Number.isInteger(Number(e)),Jy=e=>e.endsWith("%")&&$e(e.slice(0,-1)),ni=e=>xz.test(e),nD=()=>!0,Oz=e=>wz.test(e)&&!Sz.test(e),V1=()=>!1,Pz=e=>_z.test(e),Ez=e=>Az.test(e),Tz=e=>!Se(e)&&!_e(e),Cz=e=>po(e,oD,V1),Se=e=>eD.test(e),Io=e=>po(e,aD,Oz),eE=e=>po(e,Lz,$e),kz=e=>po(e,lD,nD),Rz=e=>po(e,sD,V1),tE=e=>po(e,rD,V1),jz=e=>po(e,iD,Ez),md=e=>po(e,uD,Pz),_e=e=>tD.test(e),iu=e=>Sa(e,aD),Mz=e=>Sa(e,sD),nE=e=>Sa(e,rD),Nz=e=>Sa(e,oD),Iz=e=>Sa(e,iD),yd=e=>Sa(e,uD,!0),Dz=e=>Sa(e,lD,!0),po=(e,t,n)=>{const r=eD.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Sa=(e,t,n=!1)=>{const r=tD.exec(e);return r?r[1]?t(r[1]):n:!1},rD=e=>e==="position"||e==="percentage",iD=e=>e==="image"||e==="url",oD=e=>e==="length"||e==="size"||e==="bg-size",aD=e=>e==="length",Lz=e=>e==="number",sD=e=>e==="family-name",lD=e=>e==="number"||e==="weight",uD=e=>e==="shadow",$z=()=>{const e=It("color"),t=It("font"),n=It("text"),r=It("font-weight"),i=It("tracking"),o=It("leading"),s=It("breakpoint"),l=It("container"),c=It("spacing"),f=It("radius"),h=It("shadow"),p=It("inset-shadow"),y=It("text-shadow"),g=It("drop-shadow"),S=It("blur"),b=It("perspective"),v=It("aspect"),w=It("ease"),A=It("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],P=()=>[...T(),_e,Se],C=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],j=()=>[_e,Se,c],N=()=>[zi,"full","auto",...j()],U=()=>[Vi,"none","subgrid",_e,Se],L=()=>["auto",{span:["full",Vi,_e,Se]},Vi,_e,Se],$=()=>[Vi,"auto",_e,Se],G=()=>["auto","min","max","fr",_e,Se],F=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],X=()=>["start","end","center","stretch","center-safe","end-safe"],J=()=>["auto",...j()],ee=()=>[zi,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],Q=()=>[zi,"screen","full","dvw","lvw","svw","min","max","fit",...j()],ne=()=>[zi,"screen","full","lh","dvh","lvh","svh","min","max","fit",...j()],V=()=>[e,_e,Se],D=()=>[...T(),nE,tE,{position:[_e,Se]}],K=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ae=()=>["auto","cover","contain",Nz,Cz,{size:[_e,Se]}],he=()=>[Jy,iu,Io],me=()=>["","none","full",f,_e,Se],ce=()=>["",$e,iu,Io],Ee=()=>["solid","dashed","dotted","double"],Te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ie=()=>[$e,Jy,nE,tE],Oe=()=>["","none",S,_e,Se],Ce=()=>["none",$e,_e,Se],oe=()=>["none",$e,_e,Se],He=()=>[$e,_e,Se],De=()=>[zi,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ni],breakpoint:[ni],color:[nD],container:[ni],"drop-shadow":[ni],ease:["in","out","in-out"],font:[Tz],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ni],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ni],shadow:[ni],spacing:["px",$e],text:[ni],"text-shadow":[ni],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",zi,Se,_e,v]}],container:["container"],columns:[{columns:[$e,Se,_e,l]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:P()}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:N()}],"inset-x":[{"inset-x":N()}],"inset-y":[{"inset-y":N()}],start:[{"inset-s":N(),start:N()}],end:[{"inset-e":N(),end:N()}],"inset-bs":[{"inset-bs":N()}],"inset-be":[{"inset-be":N()}],top:[{top:N()}],right:[{right:N()}],bottom:[{bottom:N()}],left:[{left:N()}],visibility:["visible","invisible","collapse"],z:[{z:[Vi,"auto",_e,Se]}],basis:[{basis:[zi,"full","auto",l,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[$e,zi,"auto","initial","none",Se]}],grow:[{grow:["",$e,_e,Se]}],shrink:[{shrink:["",$e,_e,Se]}],order:[{order:[Vi,"first","last","none",_e,Se]}],"grid-cols":[{"grid-cols":U()}],"col-start-end":[{col:L()}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":U()}],"row-start-end":[{row:L()}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":G()}],"auto-rows":[{"auto-rows":G()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...F(),"normal"]}],"justify-items":[{"justify-items":[...X(),"normal"]}],"justify-self":[{"justify-self":["auto",...X()]}],"align-content":[{content:["normal",...F()]}],"align-items":[{items:[...X(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...X(),{baseline:["","last"]}]}],"place-content":[{"place-content":F()}],"place-items":[{"place-items":[...X(),"baseline"]}],"place-self":[{"place-self":["auto",...X()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pbs:[{pbs:j()}],pbe:[{pbe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],m:[{m:J()}],mx:[{mx:J()}],my:[{my:J()}],ms:[{ms:J()}],me:[{me:J()}],mbs:[{mbs:J()}],mbe:[{mbe:J()}],mt:[{mt:J()}],mr:[{mr:J()}],mb:[{mb:J()}],ml:[{ml:J()}],"space-x":[{"space-x":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:ee()}],"inline-size":[{inline:["auto",...Q()]}],"min-inline-size":[{"min-inline":["auto",...Q()]}],"max-inline-size":[{"max-inline":["none",...Q()]}],"block-size":[{block:["auto",...ne()]}],"min-block-size":[{"min-block":["auto",...ne()]}],"max-block-size":[{"max-block":["none",...ne()]}],w:[{w:[l,"screen",...ee()]}],"min-w":[{"min-w":[l,"screen","none",...ee()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[s]},...ee()]}],h:[{h:["screen","lh",...ee()]}],"min-h":[{"min-h":["screen","lh","none",...ee()]}],"max-h":[{"max-h":["screen","lh",...ee()]}],"font-size":[{text:["base",n,iu,Io]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Dz,kz]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Jy,Se]}],"font-family":[{font:[Mz,Rz,t]}],"font-features":[{"font-features":[Se]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,_e,Se]}],"line-clamp":[{"line-clamp":[$e,"none",_e,eE]}],leading:[{leading:[o,...j()]}],"list-image":[{"list-image":["none",_e,Se]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",_e,Se]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:V()}],"text-color":[{text:V()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[$e,"from-font","auto",_e,Io]}],"text-decoration-color":[{decoration:V()}],"underline-offset":[{"underline-offset":[$e,"auto",_e,Se]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",_e,Se]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",_e,Se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:D()}],"bg-repeat":[{bg:K()}],"bg-size":[{bg:ae()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Vi,_e,Se],radial:["",_e,Se],conic:[Vi,_e,Se]},Iz,jz]}],"bg-color":[{bg:V()}],"gradient-from-pos":[{from:he()}],"gradient-via-pos":[{via:he()}],"gradient-to-pos":[{to:he()}],"gradient-from":[{from:V()}],"gradient-via":[{via:V()}],"gradient-to":[{to:V()}],rounded:[{rounded:me()}],"rounded-s":[{"rounded-s":me()}],"rounded-e":[{"rounded-e":me()}],"rounded-t":[{"rounded-t":me()}],"rounded-r":[{"rounded-r":me()}],"rounded-b":[{"rounded-b":me()}],"rounded-l":[{"rounded-l":me()}],"rounded-ss":[{"rounded-ss":me()}],"rounded-se":[{"rounded-se":me()}],"rounded-ee":[{"rounded-ee":me()}],"rounded-es":[{"rounded-es":me()}],"rounded-tl":[{"rounded-tl":me()}],"rounded-tr":[{"rounded-tr":me()}],"rounded-br":[{"rounded-br":me()}],"rounded-bl":[{"rounded-bl":me()}],"border-w":[{border:ce()}],"border-w-x":[{"border-x":ce()}],"border-w-y":[{"border-y":ce()}],"border-w-s":[{"border-s":ce()}],"border-w-e":[{"border-e":ce()}],"border-w-bs":[{"border-bs":ce()}],"border-w-be":[{"border-be":ce()}],"border-w-t":[{"border-t":ce()}],"border-w-r":[{"border-r":ce()}],"border-w-b":[{"border-b":ce()}],"border-w-l":[{"border-l":ce()}],"divide-x":[{"divide-x":ce()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ce()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ee(),"hidden","none"]}],"divide-style":[{divide:[...Ee(),"hidden","none"]}],"border-color":[{border:V()}],"border-color-x":[{"border-x":V()}],"border-color-y":[{"border-y":V()}],"border-color-s":[{"border-s":V()}],"border-color-e":[{"border-e":V()}],"border-color-bs":[{"border-bs":V()}],"border-color-be":[{"border-be":V()}],"border-color-t":[{"border-t":V()}],"border-color-r":[{"border-r":V()}],"border-color-b":[{"border-b":V()}],"border-color-l":[{"border-l":V()}],"divide-color":[{divide:V()}],"outline-style":[{outline:[...Ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[$e,_e,Se]}],"outline-w":[{outline:["",$e,iu,Io]}],"outline-color":[{outline:V()}],shadow:[{shadow:["","none",h,yd,md]}],"shadow-color":[{shadow:V()}],"inset-shadow":[{"inset-shadow":["none",p,yd,md]}],"inset-shadow-color":[{"inset-shadow":V()}],"ring-w":[{ring:ce()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:V()}],"ring-offset-w":[{"ring-offset":[$e,Io]}],"ring-offset-color":[{"ring-offset":V()}],"inset-ring-w":[{"inset-ring":ce()}],"inset-ring-color":[{"inset-ring":V()}],"text-shadow":[{"text-shadow":["none",y,yd,md]}],"text-shadow-color":[{"text-shadow":V()}],opacity:[{opacity:[$e,_e,Se]}],"mix-blend":[{"mix-blend":[...Te(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Te()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[$e]}],"mask-image-linear-from-pos":[{"mask-linear-from":ie()}],"mask-image-linear-to-pos":[{"mask-linear-to":ie()}],"mask-image-linear-from-color":[{"mask-linear-from":V()}],"mask-image-linear-to-color":[{"mask-linear-to":V()}],"mask-image-t-from-pos":[{"mask-t-from":ie()}],"mask-image-t-to-pos":[{"mask-t-to":ie()}],"mask-image-t-from-color":[{"mask-t-from":V()}],"mask-image-t-to-color":[{"mask-t-to":V()}],"mask-image-r-from-pos":[{"mask-r-from":ie()}],"mask-image-r-to-pos":[{"mask-r-to":ie()}],"mask-image-r-from-color":[{"mask-r-from":V()}],"mask-image-r-to-color":[{"mask-r-to":V()}],"mask-image-b-from-pos":[{"mask-b-from":ie()}],"mask-image-b-to-pos":[{"mask-b-to":ie()}],"mask-image-b-from-color":[{"mask-b-from":V()}],"mask-image-b-to-color":[{"mask-b-to":V()}],"mask-image-l-from-pos":[{"mask-l-from":ie()}],"mask-image-l-to-pos":[{"mask-l-to":ie()}],"mask-image-l-from-color":[{"mask-l-from":V()}],"mask-image-l-to-color":[{"mask-l-to":V()}],"mask-image-x-from-pos":[{"mask-x-from":ie()}],"mask-image-x-to-pos":[{"mask-x-to":ie()}],"mask-image-x-from-color":[{"mask-x-from":V()}],"mask-image-x-to-color":[{"mask-x-to":V()}],"mask-image-y-from-pos":[{"mask-y-from":ie()}],"mask-image-y-to-pos":[{"mask-y-to":ie()}],"mask-image-y-from-color":[{"mask-y-from":V()}],"mask-image-y-to-color":[{"mask-y-to":V()}],"mask-image-radial":[{"mask-radial":[_e,Se]}],"mask-image-radial-from-pos":[{"mask-radial-from":ie()}],"mask-image-radial-to-pos":[{"mask-radial-to":ie()}],"mask-image-radial-from-color":[{"mask-radial-from":V()}],"mask-image-radial-to-color":[{"mask-radial-to":V()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":T()}],"mask-image-conic-pos":[{"mask-conic":[$e]}],"mask-image-conic-from-pos":[{"mask-conic-from":ie()}],"mask-image-conic-to-pos":[{"mask-conic-to":ie()}],"mask-image-conic-from-color":[{"mask-conic-from":V()}],"mask-image-conic-to-color":[{"mask-conic-to":V()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:D()}],"mask-repeat":[{mask:K()}],"mask-size":[{mask:ae()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",_e,Se]}],filter:[{filter:["","none",_e,Se]}],blur:[{blur:Oe()}],brightness:[{brightness:[$e,_e,Se]}],contrast:[{contrast:[$e,_e,Se]}],"drop-shadow":[{"drop-shadow":["","none",g,yd,md]}],"drop-shadow-color":[{"drop-shadow":V()}],grayscale:[{grayscale:["",$e,_e,Se]}],"hue-rotate":[{"hue-rotate":[$e,_e,Se]}],invert:[{invert:["",$e,_e,Se]}],saturate:[{saturate:[$e,_e,Se]}],sepia:[{sepia:["",$e,_e,Se]}],"backdrop-filter":[{"backdrop-filter":["","none",_e,Se]}],"backdrop-blur":[{"backdrop-blur":Oe()}],"backdrop-brightness":[{"backdrop-brightness":[$e,_e,Se]}],"backdrop-contrast":[{"backdrop-contrast":[$e,_e,Se]}],"backdrop-grayscale":[{"backdrop-grayscale":["",$e,_e,Se]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[$e,_e,Se]}],"backdrop-invert":[{"backdrop-invert":["",$e,_e,Se]}],"backdrop-opacity":[{"backdrop-opacity":[$e,_e,Se]}],"backdrop-saturate":[{"backdrop-saturate":[$e,_e,Se]}],"backdrop-sepia":[{"backdrop-sepia":["",$e,_e,Se]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",_e,Se]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[$e,"initial",_e,Se]}],ease:[{ease:["linear","initial",w,_e,Se]}],delay:[{delay:[$e,_e,Se]}],animate:[{animate:["none",A,_e,Se]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,_e,Se]}],"perspective-origin":[{"perspective-origin":P()}],rotate:[{rotate:Ce()}],"rotate-x":[{"rotate-x":Ce()}],"rotate-y":[{"rotate-y":Ce()}],"rotate-z":[{"rotate-z":Ce()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":["scale-3d"],skew:[{skew:He()}],"skew-x":[{"skew-x":He()}],"skew-y":[{"skew-y":He()}],transform:[{transform:[_e,Se,"","none","gpu","cpu"]}],"transform-origin":[{origin:P()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:De()}],"translate-x":[{"translate-x":De()}],"translate-y":[{"translate-y":De()}],"translate-z":[{"translate-z":De()}],"translate-none":["translate-none"],accent:[{accent:V()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:V()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",_e,Se]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mbs":[{"scroll-mbs":j()}],"scroll-mbe":[{"scroll-mbe":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pbs":[{"scroll-pbs":j()}],"scroll-pbe":[{"scroll-pbe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",_e,Se]}],fill:[{fill:["none",...V()]}],"stroke-w":[{stroke:[$e,iu,Io,eE]}],stroke:[{stroke:["none",...V()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Bz=vz($z);function nl(...e){return Bz(We(e))}const Fz=x5,cD=M.forwardRef(({className:e,...t},n)=>E.jsx(FI,{ref:n,className:nl("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));cD.displayName=FI.displayName;const Uz=w5("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),fD=M.forwardRef(({className:e,variant:t,...n},r)=>E.jsx(UI,{ref:r,className:nl(Uz({variant:t}),e),...n}));fD.displayName=UI.displayName;const qz=M.forwardRef(({className:e,...t},n)=>E.jsx(VI,{ref:n,className:nl("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));qz.displayName=VI.displayName;const dD=M.forwardRef(({className:e,...t},n)=>E.jsx(WI,{ref:n,className:nl("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:E.jsx(QI,{className:"h-4 w-4"})}));dD.displayName=WI.displayName;const hD=M.forwardRef(({className:e,...t},n)=>E.jsx(qI,{ref:n,className:nl("text-sm font-semibold",e),...t}));hD.displayName=qI.displayName;const pD=M.forwardRef(({className:e,...t},n)=>E.jsx(zI,{ref:n,className:nl("text-sm opacity-90",e),...t}));pD.displayName=zI.displayName;function zz(){const{toasts:e}=Sq();return E.jsxs(Fz,{children:[e.map(function({id:t,title:n,description:r,action:i,...o}){return E.jsxs(fD,{...o,children:[E.jsxs("div",{className:"grid gap-1",children:[n&&E.jsx(hD,{children:n}),r&&E.jsx(pD,{children:r})]}),i,E.jsx(dD,{})]},t)}),E.jsx(cD,{})]})}var Lc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Vz={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Xi,N1,aI,Wz=(aI=class{constructor(){je(this,Xi,Vz);je(this,N1,!1)}setTimeoutProvider(e){ve(this,Xi,e)}setTimeout(e,t){return q(this,Xi).setTimeout(e,t)}clearTimeout(e){q(this,Xi).clearTimeout(e)}setInterval(e,t){return q(this,Xi).setInterval(e,t)}clearInterval(e){q(this,Xi).clearInterval(e)}},Xi=new WeakMap,N1=new WeakMap,aI),Vo=new Wz;function Hz(e){setTimeout(e,0)}var pa=typeof window>"u"||"Deno"in globalThis;function Tn(){}function Kz(e,t){return typeof e=="function"?e(t):e}function kx(e){return typeof e=="number"&&e>=0&&e!==1/0}function mD(e,t){return Math.max(e+(t||0)-Date.now(),0)}function so(e,t){return typeof e=="function"?e(t):e}function rr(e,t){return typeof e=="function"?e(t):e}function rE(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:l}=e;if(s){if(r){if(t.queryHash!==W1(s,t.options))return!1}else if(!qu(t.queryKey,s))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||i&&i!==t.state.fetchStatus||o&&!o(t))}function iE(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Uu(t.options.mutationKey)!==Uu(o))return!1}else if(!qu(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function W1(e,t){return((t==null?void 0:t.queryKeyHashFn)||Uu)(e)}function Uu(e){return JSON.stringify(e,(t,n)=>jx(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function qu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>qu(e[n],t[n])):!1}var Gz=Object.prototype.hasOwnProperty;function yD(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=oE(e)&&oE(t);if(!r&&!(jx(e)&&jx(t)))return t;const o=(r?e:Object.keys(e)).length,s=r?t:Object.keys(t),l=s.length,c=r?new Array(l):{};let f=0;for(let h=0;h{Vo.setTimeout(t,e)})}function Mx(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?yD(e,t):t}function Xz(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Yz(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var H1=Symbol();function vD(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===H1?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function gD(e,t){return typeof e=="function"?e(...t):!!e}function Zz(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var Zo,Yi,vs,sI,Jz=(sI=class extends Lc{constructor(){super();je(this,Zo);je(this,Yi);je(this,vs);ve(this,vs,t=>{if(!pa&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){q(this,Yi)||this.setEventListener(q(this,vs))}onUnsubscribe(){var t;this.hasListeners()||((t=q(this,Yi))==null||t.call(this),ve(this,Yi,void 0))}setEventListener(t){var n;ve(this,vs,t),(n=q(this,Yi))==null||n.call(this),ve(this,Yi,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){q(this,Zo)!==t&&(ve(this,Zo,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof q(this,Zo)=="boolean"?q(this,Zo):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Zo=new WeakMap,Yi=new WeakMap,vs=new WeakMap,sI),K1=new Jz;function Nx(){let e,t;const n=new Promise((i,o)=>{e=i,t=o});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var eV=Hz;function tV(){let e=[],t=0,n=l=>{l()},r=l=>{l()},i=eV;const o=l=>{t?e.push(l):i(()=>{n(l)})},s=()=>{const l=e;e=[],l.length&&i(()=>{r(()=>{l.forEach(c=>{n(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||s()}return c},batchCalls:l=>(...c)=>{o(()=>{l(...c)})},schedule:o,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{i=l}}}var Jt=tV(),gs,Zi,bs,lI,nV=(lI=class extends Lc{constructor(){super();je(this,gs,!0);je(this,Zi);je(this,bs);ve(this,bs,t=>{if(!pa&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){q(this,Zi)||this.setEventListener(q(this,bs))}onUnsubscribe(){var t;this.hasListeners()||((t=q(this,Zi))==null||t.call(this),ve(this,Zi,void 0))}setEventListener(t){var n;ve(this,bs,t),(n=q(this,Zi))==null||n.call(this),ve(this,Zi,t(this.setOnline.bind(this)))}setOnline(t){q(this,gs)!==t&&(ve(this,gs,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return q(this,gs)}},gs=new WeakMap,Zi=new WeakMap,bs=new WeakMap,lI),Zd=new nV;function rV(e){return Math.min(1e3*2**e,3e4)}function bD(e){return(e??"online")==="online"?Zd.isOnline():!0}var Ix=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function xD(e){let t=!1,n=0,r;const i=Nx(),o=()=>i.status!=="pending",s=b=>{var v;if(!o()){const w=new Ix(b);y(w),(v=e.onCancel)==null||v.call(e,w)}},l=()=>{t=!0},c=()=>{t=!1},f=()=>K1.isFocused()&&(e.networkMode==="always"||Zd.isOnline())&&e.canRun(),h=()=>bD(e.networkMode)&&e.canRun(),p=b=>{o()||(r==null||r(),i.resolve(b))},y=b=>{o()||(r==null||r(),i.reject(b))},g=()=>new Promise(b=>{var v;r=w=>{(o()||f())&&b(w)},(v=e.onPause)==null||v.call(e)}).then(()=>{var b;r=void 0,o()||(b=e.onContinue)==null||b.call(e)}),S=()=>{if(o())return;let b;const v=n===0?e.initialPromise:void 0;try{b=v??e.fn()}catch(w){b=Promise.reject(w)}Promise.resolve(b).then(p).catch(w=>{var C;if(o())return;const A=e.retry??(pa?0:3),O=e.retryDelay??rV,T=typeof O=="function"?O(n,w):O,P=A===!0||typeof A=="number"&&nf()?void 0:g()).then(()=>{t?y(w):S()})})};return{promise:i,status:()=>i.status,cancel:s,continue:()=>(r==null||r(),i),cancelRetry:l,continueRetry:c,canStart:h,start:()=>(h()?S():g().then(S),i)}}var Jo,uI,wD=(uI=class{constructor(){je(this,Jo)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),kx(this.gcTime)&&ve(this,Jo,Vo.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(pa?1/0:300*1e3))}clearGcTimeout(){q(this,Jo)&&(Vo.clearTimeout(q(this,Jo)),ve(this,Jo,void 0))}},Jo=new WeakMap,uI),ea,xs,nr,ta,Vt,Rc,na,br,ii,cI,iV=(cI=class extends wD{constructor(t){super();je(this,br);je(this,ea);je(this,xs);je(this,nr);je(this,ta);je(this,Vt);je(this,Rc);je(this,na);ve(this,na,!1),ve(this,Rc,t.defaultOptions),this.setOptions(t.options),this.observers=[],ve(this,ta,t.client),ve(this,nr,q(this,ta).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ve(this,ea,lE(this.options)),this.state=t.state??q(this,ea),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=q(this,Vt))==null?void 0:t.promise}setOptions(t){if(this.options={...q(this,Rc),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=lE(this.options);n.data!==void 0&&(this.setState(sE(n.data,n.dataUpdatedAt)),ve(this,ea,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&q(this,nr).remove(this)}setData(t,n){const r=Mx(this.state.data,t,this.options);return qe(this,br,ii).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){qe(this,br,ii).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=q(this,Vt))==null?void 0:r.promise;return(i=q(this,Vt))==null||i.cancel(t),n?n.then(Tn).catch(Tn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(q(this,ea))}isActive(){return this.observers.some(t=>rr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===H1||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>so(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!mD(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=q(this,Vt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=q(this,Vt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),q(this,nr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(q(this,Vt)&&(q(this,na)?q(this,Vt).cancel({revert:!0}):q(this,Vt).cancelRetry()),this.scheduleGc()),q(this,nr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||qe(this,br,ii).call(this,{type:"invalidate"})}async fetch(t,n){var c,f,h,p,y,g,S,b,v,w,A,O;if(this.state.fetchStatus!=="idle"&&((c=q(this,Vt))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(q(this,Vt))return q(this,Vt).continueRetry(),q(this,Vt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const T=this.observers.find(P=>P.options.queryFn);T&&this.setOptions(T.options)}const r=new AbortController,i=T=>{Object.defineProperty(T,"signal",{enumerable:!0,get:()=>(ve(this,na,!0),r.signal)})},o=()=>{const T=vD(this.options,n),C=(()=>{const k={client:q(this,ta),queryKey:this.queryKey,meta:this.meta};return i(k),k})();return ve(this,na,!1),this.options.persister?this.options.persister(T,C,this):T(C)},l=(()=>{const T={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:q(this,ta),state:this.state,fetchFn:o};return i(T),T})();(f=this.options.behavior)==null||f.onFetch(l,this),ve(this,xs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=l.fetchOptions)==null?void 0:h.meta))&&qe(this,br,ii).call(this,{type:"fetch",meta:(p=l.fetchOptions)==null?void 0:p.meta}),ve(this,Vt,xD({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,onCancel:T=>{T instanceof Ix&&T.revert&&this.setState({...q(this,xs),fetchStatus:"idle"}),r.abort()},onFail:(T,P)=>{qe(this,br,ii).call(this,{type:"failed",failureCount:T,error:P})},onPause:()=>{qe(this,br,ii).call(this,{type:"pause"})},onContinue:()=>{qe(this,br,ii).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const T=await q(this,Vt).start();if(T===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(T),(g=(y=q(this,nr).config).onSuccess)==null||g.call(y,T,this),(b=(S=q(this,nr).config).onSettled)==null||b.call(S,T,this.state.error,this),T}catch(T){if(T instanceof Ix){if(T.silent)return q(this,Vt).promise;if(T.revert){if(this.state.data===void 0)throw T;return this.state.data}}throw qe(this,br,ii).call(this,{type:"error",error:T}),(w=(v=q(this,nr).config).onError)==null||w.call(v,T,this),(O=(A=q(this,nr).config).onSettled)==null||O.call(A,this.state.data,T,this),T}finally{this.scheduleGc()}}},ea=new WeakMap,xs=new WeakMap,nr=new WeakMap,ta=new WeakMap,Vt=new WeakMap,Rc=new WeakMap,na=new WeakMap,br=new WeakSet,ii=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...SD(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,...sE(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ve(this,xs,t.manual?i:void 0),i;case"error":const o=t.error;return{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Jt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),q(this,nr).notify({query:this,type:"updated",action:t})})},cI);function SD(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:bD(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function sE(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function lE(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var En,ze,jc,gn,ra,ws,oi,Ji,Mc,Ss,_s,ia,oa,eo,As,tt,gu,Dx,Lx,$x,Bx,Fx,Ux,qx,_D,fI,oV=(fI=class extends Lc{constructor(t,n){super();je(this,tt);je(this,En);je(this,ze);je(this,jc);je(this,gn);je(this,ra);je(this,ws);je(this,oi);je(this,Ji);je(this,Mc);je(this,Ss);je(this,_s);je(this,ia);je(this,oa);je(this,eo);je(this,As,new Set);this.options=n,ve(this,En,t),ve(this,Ji,null),ve(this,oi,Nx()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(q(this,ze).addObserver(this),uE(q(this,ze),this.options)?qe(this,tt,gu).call(this):this.updateResult(),qe(this,tt,Bx).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return zx(q(this,ze),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return zx(q(this,ze),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,qe(this,tt,Fx).call(this),qe(this,tt,Ux).call(this),q(this,ze).removeObserver(this)}setOptions(t){const n=this.options,r=q(this,ze);if(this.options=q(this,En).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof rr(this.options.enabled,q(this,ze))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");qe(this,tt,qx).call(this),q(this,ze).setOptions(this.options),n._defaulted&&!Rx(this.options,n)&&q(this,En).getQueryCache().notify({type:"observerOptionsUpdated",query:q(this,ze),observer:this});const i=this.hasListeners();i&&cE(q(this,ze),r,this.options,n)&&qe(this,tt,gu).call(this),this.updateResult(),i&&(q(this,ze)!==r||rr(this.options.enabled,q(this,ze))!==rr(n.enabled,q(this,ze))||so(this.options.staleTime,q(this,ze))!==so(n.staleTime,q(this,ze)))&&qe(this,tt,Dx).call(this);const o=qe(this,tt,Lx).call(this);i&&(q(this,ze)!==r||rr(this.options.enabled,q(this,ze))!==rr(n.enabled,q(this,ze))||o!==q(this,eo))&&qe(this,tt,$x).call(this,o)}getOptimisticResult(t){const n=q(this,En).getQueryCache().build(q(this,En),t),r=this.createResult(n,t);return sV(this,r)&&(ve(this,gn,r),ve(this,ws,this.options),ve(this,ra,q(this,ze).state)),r}getCurrentResult(){return q(this,gn)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&q(this,oi).status==="pending"&&q(this,oi).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,i))})}trackProp(t){q(this,As).add(t)}getCurrentQuery(){return q(this,ze)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=q(this,En).defaultQueryOptions(t),r=q(this,En).getQueryCache().build(q(this,En),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return qe(this,tt,gu).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),q(this,gn)))}createResult(t,n){var N;const r=q(this,ze),i=this.options,o=q(this,gn),s=q(this,ra),l=q(this,ws),f=t!==r?t.state:q(this,jc),{state:h}=t;let p={...h},y=!1,g;if(n._optimisticResults){const U=this.hasListeners(),L=!U&&uE(t,n),$=U&&cE(t,r,n,i);(L||$)&&(p={...p,...SD(h.data,t.options)}),n._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:S,errorUpdatedAt:b,status:v}=p;g=p.data;let w=!1;if(n.placeholderData!==void 0&&g===void 0&&v==="pending"){let U;o!=null&&o.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData)?(U=o.data,w=!0):U=typeof n.placeholderData=="function"?n.placeholderData((N=q(this,_s))==null?void 0:N.state.data,q(this,_s)):n.placeholderData,U!==void 0&&(v="success",g=Mx(o==null?void 0:o.data,U,n),y=!0)}if(n.select&&g!==void 0&&!w)if(o&&g===(s==null?void 0:s.data)&&n.select===q(this,Mc))g=q(this,Ss);else try{ve(this,Mc,n.select),g=n.select(g),g=Mx(o==null?void 0:o.data,g,n),ve(this,Ss,g),ve(this,Ji,null)}catch(U){ve(this,Ji,U)}q(this,Ji)&&(S=q(this,Ji),g=q(this,Ss),b=Date.now(),v="error");const A=p.fetchStatus==="fetching",O=v==="pending",T=v==="error",P=O&&A,C=g!==void 0,j={status:v,fetchStatus:p.fetchStatus,isPending:O,isSuccess:v==="success",isError:T,isInitialLoading:P,isLoading:P,data:g,dataUpdatedAt:p.dataUpdatedAt,error:S,errorUpdatedAt:b,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>f.dataUpdateCount||p.errorUpdateCount>f.errorUpdateCount,isFetching:A,isRefetching:A&&!O,isLoadingError:T&&!C,isPaused:p.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:T&&C,isStale:G1(t,n),refetch:this.refetch,promise:q(this,oi),isEnabled:rr(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const U=j.data!==void 0,L=j.status==="error"&&!U,$=X=>{L?X.reject(j.error):U&&X.resolve(j.data)},G=()=>{const X=ve(this,oi,j.promise=Nx());$(X)},F=q(this,oi);switch(F.status){case"pending":t.queryHash===r.queryHash&&$(F);break;case"fulfilled":(L||j.data!==F.value)&&G();break;case"rejected":(!L||j.error!==F.reason)&&G();break}}return j}updateResult(){const t=q(this,gn),n=this.createResult(q(this,ze),this.options);if(ve(this,ra,q(this,ze).state),ve(this,ws,this.options),q(this,ra).data!==void 0&&ve(this,_s,q(this,ze)),Rx(n,t))return;ve(this,gn,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,o=typeof i=="function"?i():i;if(o==="all"||!o&&!q(this,As).size)return!0;const s=new Set(o??q(this,As));return this.options.throwOnError&&s.add("error"),Object.keys(q(this,gn)).some(l=>{const c=l;return q(this,gn)[c]!==t[c]&&s.has(c)})};qe(this,tt,_D).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&qe(this,tt,Bx).call(this)}},En=new WeakMap,ze=new WeakMap,jc=new WeakMap,gn=new WeakMap,ra=new WeakMap,ws=new WeakMap,oi=new WeakMap,Ji=new WeakMap,Mc=new WeakMap,Ss=new WeakMap,_s=new WeakMap,ia=new WeakMap,oa=new WeakMap,eo=new WeakMap,As=new WeakMap,tt=new WeakSet,gu=function(t){qe(this,tt,qx).call(this);let n=q(this,ze).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Tn)),n},Dx=function(){qe(this,tt,Fx).call(this);const t=so(this.options.staleTime,q(this,ze));if(pa||q(this,gn).isStale||!kx(t))return;const r=mD(q(this,gn).dataUpdatedAt,t)+1;ve(this,ia,Vo.setTimeout(()=>{q(this,gn).isStale||this.updateResult()},r))},Lx=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(q(this,ze)):this.options.refetchInterval)??!1},$x=function(t){qe(this,tt,Ux).call(this),ve(this,eo,t),!(pa||rr(this.options.enabled,q(this,ze))===!1||!kx(q(this,eo))||q(this,eo)===0)&&ve(this,oa,Vo.setInterval(()=>{(this.options.refetchIntervalInBackground||K1.isFocused())&&qe(this,tt,gu).call(this)},q(this,eo)))},Bx=function(){qe(this,tt,Dx).call(this),qe(this,tt,$x).call(this,qe(this,tt,Lx).call(this))},Fx=function(){q(this,ia)&&(Vo.clearTimeout(q(this,ia)),ve(this,ia,void 0))},Ux=function(){q(this,oa)&&(Vo.clearInterval(q(this,oa)),ve(this,oa,void 0))},qx=function(){const t=q(this,En).getQueryCache().build(q(this,En),this.options);if(t===q(this,ze))return;const n=q(this,ze);ve(this,ze,t),ve(this,jc,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},_D=function(t){Jt.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(q(this,gn))}),q(this,En).getQueryCache().notify({query:q(this,ze),type:"observerResultsUpdated"})})},fI);function aV(e,t){return rr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function uE(e,t){return aV(e,t)||e.state.data!==void 0&&zx(e,t,t.refetchOnMount)}function zx(e,t,n){if(rr(t.enabled,e)!==!1&&so(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&G1(e,t)}return!1}function cE(e,t,n,r){return(e!==t||rr(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&G1(e,n)}function G1(e,t){return rr(t.enabled,e)!==!1&&e.isStaleByTime(so(t.staleTime,e))}function sV(e,t){return!Rx(e.getCurrentResult(),t)}function fE(e){return{onFetch:(t,n)=>{var h,p,y,g,S;const r=t.options,i=(y=(p=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:p.fetchMore)==null?void 0:y.direction,o=((g=t.state.data)==null?void 0:g.pages)||[],s=((S=t.state.data)==null?void 0:S.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const f=async()=>{let b=!1;const v=O=>{Zz(O,()=>t.signal,()=>b=!0)},w=vD(t.options,t.fetchOptions),A=async(O,T,P)=>{if(b)return Promise.reject();if(T==null&&O.pages.length)return Promise.resolve(O);const k=(()=>{const L={client:t.client,queryKey:t.queryKey,pageParam:T,direction:P?"backward":"forward",meta:t.options.meta};return v(L),L})(),j=await w(k),{maxPages:N}=t.options,U=P?Yz:Xz;return{pages:U(O.pages,j,N),pageParams:U(O.pageParams,T,N)}};if(i&&o.length){const O=i==="backward",T=O?lV:dE,P={pages:o,pageParams:s},C=T(r,P);l=await A(P,C,O)}else{const O=e??o.length;do{const T=c===0?s[0]??r.initialPageParam:dE(r,l);if(c>0&&T==null)break;l=await A(l,T),c++}while(c{var b,v;return(v=(b=t.options).persister)==null?void 0:v.call(b,f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=f}}}function dE(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function lV(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Nc,Nr,un,aa,Ir,Wi,dI,uV=(dI=class extends wD{constructor(t){super();je(this,Ir);je(this,Nc);je(this,Nr);je(this,un);je(this,aa);ve(this,Nc,t.client),this.mutationId=t.mutationId,ve(this,un,t.mutationCache),ve(this,Nr,[]),this.state=t.state||cV(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){q(this,Nr).includes(t)||(q(this,Nr).push(t),this.clearGcTimeout(),q(this,un).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ve(this,Nr,q(this,Nr).filter(n=>n!==t)),this.scheduleGc(),q(this,un).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){q(this,Nr).length||(this.state.status==="pending"?this.scheduleGc():q(this,un).remove(this))}continue(){var t;return((t=q(this,aa))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,l,c,f,h,p,y,g,S,b,v,w,A,O,T,P,C,k;const n=()=>{qe(this,Ir,Wi).call(this,{type:"continue"})},r={client:q(this,Nc),meta:this.options.meta,mutationKey:this.options.mutationKey};ve(this,aa,xD({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(j,N)=>{qe(this,Ir,Wi).call(this,{type:"failed",failureCount:j,error:N})},onPause:()=>{qe(this,Ir,Wi).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>q(this,un).canRun(this)}));const i=this.state.status==="pending",o=!q(this,aa).canStart();try{if(i)n();else{qe(this,Ir,Wi).call(this,{type:"pending",variables:t,isPaused:o}),q(this,un).config.onMutate&&await q(this,un).config.onMutate(t,this,r);const N=await((l=(s=this.options).onMutate)==null?void 0:l.call(s,t,r));N!==this.state.context&&qe(this,Ir,Wi).call(this,{type:"pending",context:N,variables:t,isPaused:o})}const j=await q(this,aa).start();return await((f=(c=q(this,un).config).onSuccess)==null?void 0:f.call(c,j,t,this.state.context,this,r)),await((p=(h=this.options).onSuccess)==null?void 0:p.call(h,j,t,this.state.context,r)),await((g=(y=q(this,un).config).onSettled)==null?void 0:g.call(y,j,null,this.state.variables,this.state.context,this,r)),await((b=(S=this.options).onSettled)==null?void 0:b.call(S,j,null,t,this.state.context,r)),qe(this,Ir,Wi).call(this,{type:"success",data:j}),j}catch(j){try{await((w=(v=q(this,un).config).onError)==null?void 0:w.call(v,j,t,this.state.context,this,r))}catch(N){Promise.reject(N)}try{await((O=(A=this.options).onError)==null?void 0:O.call(A,j,t,this.state.context,r))}catch(N){Promise.reject(N)}try{await((P=(T=q(this,un).config).onSettled)==null?void 0:P.call(T,void 0,j,this.state.variables,this.state.context,this,r))}catch(N){Promise.reject(N)}try{await((k=(C=this.options).onSettled)==null?void 0:k.call(C,void 0,j,t,this.state.context,r))}catch(N){Promise.reject(N)}throw qe(this,Ir,Wi).call(this,{type:"error",error:j}),j}finally{q(this,un).runNext(this)}}},Nc=new WeakMap,Nr=new WeakMap,un=new WeakMap,aa=new WeakMap,Ir=new WeakSet,Wi=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Jt.batch(()=>{q(this,Nr).forEach(r=>{r.onMutationUpdate(t)}),q(this,un).notify({mutation:this,type:"updated",action:t})})},dI);function cV(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ai,xr,Ic,hI,fV=(hI=class extends Lc{constructor(t={}){super();je(this,ai);je(this,xr);je(this,Ic);this.config=t,ve(this,ai,new Set),ve(this,xr,new Map),ve(this,Ic,0)}build(t,n,r){const i=new uV({client:t,mutationCache:this,mutationId:++cd(this,Ic)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){q(this,ai).add(t);const n=vd(t);if(typeof n=="string"){const r=q(this,xr).get(n);r?r.push(t):q(this,xr).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(q(this,ai).delete(t)){const n=vd(t);if(typeof n=="string"){const r=q(this,xr).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&q(this,xr).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=vd(t);if(typeof n=="string"){const r=q(this,xr).get(n),i=r==null?void 0:r.find(o=>o.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=vd(t);if(typeof n=="string"){const i=(r=q(this,xr).get(n))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Jt.batch(()=>{q(this,ai).forEach(t=>{this.notify({type:"removed",mutation:t})}),q(this,ai).clear(),q(this,xr).clear()})}getAll(){return Array.from(q(this,ai))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>iE(n,r))}findAll(t={}){return this.getAll().filter(n=>iE(t,n))}notify(t){Jt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Jt.batch(()=>Promise.all(t.map(n=>n.continue().catch(Tn))))}},ai=new WeakMap,xr=new WeakMap,Ic=new WeakMap,hI);function vd(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Dr,pI,dV=(pI=class extends Lc{constructor(t={}){super();je(this,Dr);this.config=t,ve(this,Dr,new Map)}build(t,n,r){const i=n.queryKey,o=n.queryHash??W1(i,n);let s=this.get(o);return s||(s=new iV({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){q(this,Dr).has(t.queryHash)||(q(this,Dr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=q(this,Dr).get(t.queryHash);n&&(t.destroy(),n===t&&q(this,Dr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Jt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return q(this,Dr).get(t)}getAll(){return[...q(this,Dr).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>rE(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>rE(t,r)):n}notify(t){Jt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Jt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Jt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Dr=new WeakMap,pI),wt,to,no,Os,Ps,ro,Es,Ts,mI,hV=(mI=class{constructor(e={}){je(this,wt);je(this,to);je(this,no);je(this,Os);je(this,Ps);je(this,ro);je(this,Es);je(this,Ts);ve(this,wt,e.queryCache||new dV),ve(this,to,e.mutationCache||new fV),ve(this,no,e.defaultOptions||{}),ve(this,Os,new Map),ve(this,Ps,new Map),ve(this,ro,0)}mount(){cd(this,ro)._++,q(this,ro)===1&&(ve(this,Es,K1.subscribe(async e=>{e&&(await this.resumePausedMutations(),q(this,wt).onFocus())})),ve(this,Ts,Zd.subscribe(async e=>{e&&(await this.resumePausedMutations(),q(this,wt).onOnline())})))}unmount(){var e,t;cd(this,ro)._--,q(this,ro)===0&&((e=q(this,Es))==null||e.call(this),ve(this,Es,void 0),(t=q(this,Ts))==null||t.call(this),ve(this,Ts,void 0))}isFetching(e){return q(this,wt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return q(this,to).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=q(this,wt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=q(this,wt).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(so(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return q(this,wt).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=q(this,wt).get(r.queryHash),o=i==null?void 0:i.state.data,s=Kz(t,o);if(s!==void 0)return q(this,wt).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return Jt.batch(()=>q(this,wt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=q(this,wt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=q(this,wt);Jt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=q(this,wt);return Jt.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Jt.batch(()=>q(this,wt).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Tn).catch(Tn)}invalidateQueries(e,t={}){return Jt.batch(()=>(q(this,wt).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Jt.batch(()=>q(this,wt).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(Tn)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Tn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=q(this,wt).build(this,t);return n.isStaleByTime(so(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Tn).catch(Tn)}fetchInfiniteQuery(e){return e.behavior=fE(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Tn).catch(Tn)}ensureInfiniteQueryData(e){return e.behavior=fE(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Zd.isOnline()?q(this,to).resumePausedMutations():Promise.resolve()}getQueryCache(){return q(this,wt)}getMutationCache(){return q(this,to)}getDefaultOptions(){return q(this,no)}setDefaultOptions(e){ve(this,no,e)}setQueryDefaults(e,t){q(this,Os).set(Uu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...q(this,Os).values()],n={};return t.forEach(r=>{qu(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){q(this,Ps).set(Uu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...q(this,Ps).values()],n={};return t.forEach(r=>{qu(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...q(this,no).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=W1(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===H1&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...q(this,no).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){q(this,wt).clear(),q(this,to).clear()}},wt=new WeakMap,to=new WeakMap,no=new WeakMap,Os=new WeakMap,Ps=new WeakMap,ro=new WeakMap,Es=new WeakMap,Ts=new WeakMap,mI),AD=M.createContext(void 0),pV=e=>{const t=M.useContext(AD);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},mV=({client:e,children:t})=>(M.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),E.jsx(AD.Provider,{value:e,children:t})),OD=M.createContext(!1),yV=()=>M.useContext(OD);OD.Provider;function vV(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var gV=M.createContext(vV()),bV=()=>M.useContext(gV),xV=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?gD(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},wV=e=>{M.useEffect(()=>{e.clearReset()},[e])},SV=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||gD(n,[e.error,r])),_V=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},AV=(e,t)=>e.isLoading&&e.isFetching&&!t,OV=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,hE=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function PV(e,t,n){var y,g,S,b;const r=yV(),i=bV(),o=pV(),s=o.defaultQueryOptions(e);(g=(y=o.getDefaultOptions().queries)==null?void 0:y._experimental_beforeQuery)==null||g.call(y,s);const l=o.getQueryCache().get(s.queryHash);s._optimisticResults=r?"isRestoring":"optimistic",_V(s),xV(s,i,l),wV(i);const c=!o.getQueryCache().get(s.queryHash),[f]=M.useState(()=>new t(o,s)),h=f.getOptimisticResult(s),p=!r&&e.subscribed!==!1;if(M.useSyncExternalStore(M.useCallback(v=>{const w=p?f.subscribe(Jt.batchCalls(v)):Tn;return f.updateResult(),w},[f,p]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),M.useEffect(()=>{f.setOptions(s)},[s,f]),OV(s,h))throw hE(s,f,i);if(SV({result:h,errorResetBoundary:i,throwOnError:s.throwOnError,query:l,suspense:s.suspense}))throw h.error;if((b=(S=o.getDefaultOptions().queries)==null?void 0:S._experimental_afterQuery)==null||b.call(S,s,h),s.experimental_prefetchInRender&&!pa&&AV(h,r)){const v=c?hE(s,f,i):l==null?void 0:l.promise;v==null||v.catch(Tn).finally(()=>{f.updateResult()})}return s.notifyOnChangeProps?h:f.trackResult(h)}function EV(e,t){return PV(e,oV)}const TV=new hV({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});/** * @remix-run/router v1.23.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Jd(){return Jd=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function PD(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function kV(){return Math.random().toString(36).substr(2,8)}function mE(e,t){return{usr:e.state,key:e.key,idx:t}}function Vx(e,t,n,r){return n===void 0&&(n=null),Jd({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?fp(t):t,{state:n,key:t&&t.key||r||kV()})}function ED(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function fp(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function RV(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,l=io.Pop,c=null,f=h();f==null&&(f=0,s.replaceState(Jd({},s.state,{idx:f}),""));function h(){return(s.state||{idx:null}).idx}function p(){l=io.Pop;let v=h(),w=v==null?null:v-f;f=v,c&&c({action:l,location:b.location,delta:w})}function y(v,w){l=io.Push;let A=Vx(b.location,v,w);f=h()+1;let O=mE(A,f),T=b.createHref(A);try{s.pushState(O,"",T)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;i.location.assign(T)}o&&c&&c({action:l,location:b.location,delta:1})}function g(v,w){l=io.Replace;let A=Vx(b.location,v,w);f=h();let O=mE(A,f),T=b.createHref(A);s.replaceState(O,"",T),o&&c&&c({action:l,location:b.location,delta:0})}function S(v){let w=i.location.origin!=="null"?i.location.origin:i.location.href,A=typeof v=="string"?v:ED(v);return A=A.replace(/ $/,"%20"),Rn(w,"No window.location.(origin|href) available to create URL for href: "+A),new URL(A,w)}let b={get action(){return l},get location(){return e(i,s)},listen(v){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(pE,p),c=v,()=>{i.removeEventListener(pE,p),c=null}},createHref(v){return t(i,v)},createURL:S,encodeLocation(v){let w=S(v);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:y,replace:g,go(v){return s.go(v)}};return b}var yE;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(yE||(yE={}));function jV(e,t,n){return n===void 0&&(n="/"),MV(e,t,n)}function MV(e,t,n,r){let i=typeof t=="string"?fp(t):t,o=kD(i.pathname||"/",n);if(o==null)return null;let s=TD(e);NV(s);let l=null,c=HV(o);for(let f=0;l==null&&f{let c={relativePath:l===void 0?o.path||"":l,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};c.relativePath.startsWith("/")&&(Rn(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let f=ds([r,c.relativePath]),h=n.concat(c);o.children&&o.children.length>0&&(Rn(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+f+'".')),TD(o.children,t,h,f)),!(o.path==null&&!o.index)&&t.push({path:f,score:UV(f,o.index),routesMeta:h})};return e.forEach((o,s)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))i(o,s);else for(let c of CD(o.path))i(o,s,c)}),t}function CD(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=CD(r.join("/")),l=[];return l.push(...s.map(c=>c===""?o:[o,c].join("/"))),i&&l.push(...s),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function NV(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:qV(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const IV=/^:[\w-]+$/,DV=3,LV=2,$V=1,BV=10,FV=-2,vE=e=>e==="*";function UV(e,t){let n=e.split("/"),r=n.length;return n.some(vE)&&(r+=FV),t&&(r+=LV),n.filter(i=>!vE(i)).reduce((i,o)=>i+(IV.test(o)?DV:o===""?$V:BV),r)}function qV(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function zV(e,t,n){let{routesMeta:r}=e,i={},o="/",s=[];for(let l=0;l{let{paramName:y,isOptional:g}=h;if(y==="*"){let b=l[p]||"";s=o.slice(0,o.length-b.length).replace(/(.)\/+$/,"$1")}const S=l[p];return g&&!S?f[y]=void 0:f[y]=(S||"").replace(/%2F/g,"/"),f},{}),pathname:o,pathnameBase:s,pattern:e}}function WV(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),PD(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,l,c)=>(r.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function HV(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return PD(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function kD(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const KV=e=>e.replace(/\/\/+/g,"/"),ds=e=>KV(e.join("/")),GV=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/");function QV(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const RD=["post","put","patch","delete"];new Set(RD);const XV=["get",...RD];new Set(XV);/** * React Router v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function eh(){return eh=Object.assign?Object.assign.bind():function(e){for(var t=1;tObject.assign({},v,{params:Object.assign({},l,v.params),pathname:ds([c,i.encodeLocation?i.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?c:ds([c,i.encodeLocation?i.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),o,n,r);return t&&b?M.createElement($c.Provider,{value:{location:eh({pathname:"/",search:"",hash:"",state:null,key:"default"},h),navigationType:io.Pop}},b):b}function n8(){let e=c8(),t=QV(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return M.createElement(M.Fragment,null,M.createElement("h2",null,"Unexpected Application Error!"),M.createElement("h3",{style:{fontStyle:"italic"}},t),n?M.createElement("pre",{style:i},n):null,null)}const r8=M.createElement(n8,null);class i8 extends M.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?M.createElement(dp.Provider,{value:this.props.routeContext},M.createElement(MD.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function o8(e){let{routeContext:t,match:n,children:r}=e,i=M.useContext(YV);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),M.createElement(dp.Provider,{value:t},r)}function a8(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,l=(i=n)==null?void 0:i.errors;if(l!=null){let h=s.findIndex(p=>p.route.id&&(l==null?void 0:l[p.route.id])!==void 0);h>=0||Rn(!1),s=s.slice(0,Math.min(s.length,h+1))}let c=!1,f=-1;if(n&&r&&r.v7_partialHydration)for(let h=0;h=0?s=s.slice(0,f+1):s=[s[0]];break}}}return s.reduceRight((h,p,y)=>{let g,S=!1,b=null,v=null;n&&(g=l&&p.route.id?l[p.route.id]:void 0,b=p.route.errorElement||r8,c&&(f<0&&y===0?(f8("route-fallback"),S=!0,v=null):f===y&&(S=!0,v=p.route.hydrateFallbackElement||null)));let w=t.concat(s.slice(0,y+1)),A=()=>{let O;return g?O=b:S?O=v:p.route.Component?O=M.createElement(p.route.Component,null):p.route.element?O=p.route.element:O=h,M.createElement(o8,{match:p,routeContext:{outlet:h,matches:w,isDataRoute:n!=null},children:O})};return n&&(p.route.ErrorBoundary||p.route.errorElement||y===0)?M.createElement(i8,{location:n.location,revalidation:n.revalidation,component:b,error:g,children:A(),routeContext:{outlet:null,matches:w,isDataRoute:!0}}):A()},null)}var ND=(function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e})(ND||{});function s8(e){let t=M.useContext(ZV);return t||Rn(!1),t}function l8(e){let t=M.useContext(dp);return t||Rn(!1),t}function u8(e){let t=l8(),n=t.matches[t.matches.length-1];return n.route.id||Rn(!1),n.route.id}function c8(){var e;let t=M.useContext(MD),n=s8(ND.UseRouteError),r=u8();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}const gE={};function f8(e,t,n){gE[e]||(gE[e]=!0)}function d8(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Fd(e){Rn(!1)}function h8(e){let{basename:t="/",children:n=null,location:r,navigationType:i=io.Pop,navigator:o,static:s=!1,future:l}=e;Q1()&&Rn(!1);let c=t.replace(/^\/*/,"/"),f=M.useMemo(()=>({basename:c,navigator:o,static:s,future:eh({v7_relativeSplatPath:!1},l)}),[c,l,o,s]);typeof r=="string"&&(r=fp(r));let{pathname:h="/",search:p="",hash:y="",state:g=null,key:S="default"}=r,b=M.useMemo(()=>{let v=kD(h,c);return v==null?null:{location:{pathname:v,search:p,hash:y,state:g,key:S},navigationType:i}},[c,h,p,y,g,S,i]);return b==null?null:M.createElement(jD.Provider,{value:f},M.createElement($c.Provider,{children:n,value:b}))}function p8(e){let{children:t,location:n}=e;return e8(Wx(t),n)}new Promise(()=>{});function Wx(e,t){t===void 0&&(t=[]);let n=[];return M.Children.forEach(e,(r,i)=>{if(!M.isValidElement(r))return;let o=[...t,i];if(r.type===M.Fragment){n.push.apply(n,Wx(r.props.children,o));return}r.type!==Fd&&Rn(!1),!r.props.index||!r.props.children||Rn(!1);let s={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=Wx(r.props.children,o)),n.push(s)}),n}/** * React Router DOM v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */const m8="6";try{window.__reactRouterVersion=m8}catch{}const y8="startTransition",bE=vI[y8];function v8(e){let{basename:t,children:n,future:r,window:i}=e,o=M.useRef();o.current==null&&(o.current=CV({window:i,v5Compat:!0}));let s=o.current,[l,c]=M.useState({action:s.action,location:s.location}),{v7_startTransition:f}=r||{},h=M.useCallback(p=>{f&&bE?bE(()=>c(p)):c(p)},[c,f]);return M.useLayoutEffect(()=>s.listen(h),[s,h]),M.useEffect(()=>d8(r),[r]),M.createElement(h8,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:s,future:r})}var xE;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(xE||(xE={}));var wE;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(wE||(wE={}));function ID(e,t){return function(){return e.apply(t,arguments)}}const{toString:g8}=Object.prototype,{getPrototypeOf:Cs}=Object,{iterator:Bc,toStringTag:DD}=Symbol,th=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),zu=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),th(n,t))return!0;n=Cs(n)}return!1},b8=(e,t)=>e!=null&&zu(e,t)?e[t]:void 0,Y1=(e=>t=>{const n=g8.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Pr=e=>(e=e.toLowerCase(),t=>Y1(t)===e),hp=e=>t=>typeof t===e,{isArray:ma}=Array,ks=hp("undefined");function rl(e){return e!==null&&!ks(e)&&e.constructor!==null&&!ks(e.constructor)&&kn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const LD=Pr("ArrayBuffer");function x8(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&LD(e.buffer),t}const w8=hp("string"),kn=hp("function"),$D=hp("number"),il=e=>e!==null&&typeof e=="object",S8=e=>e===!0||e===!1,Ud=e=>{if(!il(e))return!1;const t=Cs(e);return(t===null||t===Object.prototype||Cs(t)===null)&&!zu(e,DD)&&!zu(e,Bc)},_8=e=>{if(!il(e)||rl(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},A8=Pr("Date"),O8=Pr("File"),P8=e=>!!(e&&typeof e.uri<"u"),E8=e=>e&&typeof e.getParts<"u",T8=Pr("Blob"),C8=Pr("FileList"),k8=e=>il(e)&&kn(e.pipe);function R8(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const SE=R8(),_E=typeof SE.FormData<"u"?SE.FormData:void 0,j8=e=>{if(!e)return!1;if(_E&&e instanceof _E)return!0;const t=Cs(e);if(!t||t===Object.prototype||!kn(e.append))return!1;const n=Y1(e);return n==="formdata"||n==="object"&&kn(e.toString)&&e.toString()==="[object FormData]"},M8=Pr("URLSearchParams"),[N8,I8,D8,L8]=["ReadableStream","Request","Response","Headers"].map(Pr),$8=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Fc(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),ma(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}const Wo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,FD=e=>!ks(e)&&e!==Wo;function Hx(...e){const{caseless:t,skipUndefined:n}=FD(this)&&this||{},r={},i=(o,s)=>{if(s==="__proto__"||s==="constructor"||s==="prototype")return;const l=t&&typeof s=="string"&&BD(r,s)||s,c=th(r,l)?r[l]:void 0;Ud(c)&&Ud(o)?r[l]=Hx(c,o):Ud(o)?r[l]=Hx({},o):ma(o)?r[l]=o.slice():(!n||!ks(o))&&(r[l]=o)};for(let o=0,s=e.length;o(Fc(t,(i,o)=>{n&&kn(i)?Object.defineProperty(e,o,{__proto__:null,value:ID(i,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{__proto__:null,value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),F8=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),U8=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},q8=(e,t,n,r)=>{let i,o,s;const l={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!r||r(s,e,t))&&!l[s]&&(t[s]=e[s],l[s]=!0);e=n!==!1&&Cs(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},z8=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},V8=e=>{if(!e)return null;if(ma(e))return e;let t=e.length;if(!$D(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},W8=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Cs(Uint8Array)),H8=(e,t)=>{const r=(e&&e[Bc]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},K8=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},G8=Pr("HTMLFormElement"),Q8=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),{propertyIsEnumerable:X8}=Object.prototype,Y8=Pr("RegExp"),UD=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Fc(n,(i,o)=>{let s;(s=t(i,o,e))!==!1&&(r[o]=s||i)}),Object.defineProperties(e,r)},Z8=e=>{UD(e,(t,n)=>{if(kn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(kn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},J8=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return ma(e)?r(e):r(String(e).split(t)),n},e6=()=>{},t6=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function n6(e){return!!(e&&kn(e.append)&&e[DD]==="FormData"&&e[Bc])}const r6=e=>{const t=new WeakSet,n=r=>{if(il(r)){if(t.has(r))return;if(rl(r))return r;if(!("toJSON"in r)){t.add(r);const i=ma(r)?[]:{};return Fc(r,(o,s)=>{const l=n(o);!ks(l)&&(i[s]=l)}),t.delete(r),i}}return r};return n(e)},i6=Pr("AsyncFunction"),o6=e=>e&&(il(e)||kn(e))&&kn(e.then)&&kn(e.catch),qD=((e,t)=>e?setImmediate:t?((n,r)=>(Wo.addEventListener("message",({source:i,data:o})=>{i===Wo&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Wo.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",kn(Wo.postMessage)),a6=typeof queueMicrotask<"u"?queueMicrotask.bind(Wo):typeof process<"u"&&process.nextTick||qD,zD=e=>e!=null&&kn(e[Bc]),s6=e=>e!=null&&zu(e,Bc)&&zD(e),H={isArray:ma,isArrayBuffer:LD,isBuffer:rl,isFormData:j8,isArrayBufferView:x8,isString:w8,isNumber:$D,isBoolean:S8,isObject:il,isPlainObject:Ud,isEmptyObject:_8,isReadableStream:N8,isRequest:I8,isResponse:D8,isHeaders:L8,isUndefined:ks,isDate:A8,isFile:O8,isReactNativeBlob:P8,isReactNative:E8,isBlob:T8,isRegExp:Y8,isFunction:kn,isStream:k8,isURLSearchParams:M8,isTypedArray:W8,isFileList:C8,forEach:Fc,merge:Hx,extend:B8,trim:$8,stripBOM:F8,inherits:U8,toFlatObject:q8,kindOf:Y1,kindOfTest:Pr,endsWith:z8,toArray:V8,forEachEntry:H8,matchAll:K8,isHTMLForm:G8,hasOwnProperty:th,hasOwnProp:th,hasOwnInPrototypeChain:zu,getSafeProp:b8,reduceDescriptors:UD,freezeMethods:Z8,toObjectSet:J8,toCamelCase:Q8,noop:e6,toFiniteNumber:t6,findKey:BD,global:Wo,isContextDefined:FD,isSpecCompliantForm:n6,toJSONObject:r6,isAsyncFn:i6,isThenable:o6,setImmediate:qD,asap:a6,isIterable:zD,isSafeIterable:s6},l6=H.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),u6=e=>{const t={};let n,r,i;return e&&e.split(` `).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||t[n]&&l6[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function c6(e){let t=0,n=e.length;for(;tt;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const f6=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),d6=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Z1(e,t){return H.isArray(e)?e.map(n=>Z1(n,t)):c6(String(e).replace(t,""))}const h6=e=>Z1(e,f6),p6=e=>Z1(e,d6);function VD(e){const t=Object.create(null);return H.forEach(e.toJSON(),(n,r)=>{t[r]=p6(n)}),t}const AE=Symbol("internals");function ou(e){return e&&String(e).trim().toLowerCase()}function qd(e){return e===!1||e==null?e:H.isArray(e)?e.map(qd):h6(String(e))}function m6(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const y6=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ev(e,t,n,r,i){if(H.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!H.isString(t)){if(H.isString(r))return t.indexOf(r)!==-1;if(H.isRegExp(r))return r.test(t)}}function v6(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function g6(e,t){const n=H.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(i,o,s){return this[r].call(this,t,i,o,s)},configurable:!0})})}let mn=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(l,c,f){const h=ou(c);if(!h)return;const p=H.findKey(i,h);(!p||i[p]===void 0||f===!0||f===void 0&&i[p]!==!1)&&(i[p||c]=qd(l))}const s=(l,c)=>H.forEach(l,(f,h)=>o(f,h,c));if(H.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(H.isString(t)&&(t=t.trim())&&!y6(t))s(u6(t),n);else if(H.isObject(t)&&H.isSafeIterable(t)){let l=Object.create(null),c,f;for(const h of t){if(!H.isArray(h))throw new TypeError("Object iterator must return a key-value pair");f=h[0],H.hasOwnProp(l,f)?(c=l[f],l[f]=H.isArray(c)?[...c,h[1]]:[c,h[1]]):l[f]=h[1]}s(l,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=ou(t),t){const r=H.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return m6(i);if(H.isFunction(n))return n.call(this,i,r);if(H.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ou(t),t){const r=H.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ev(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(s){if(s=ou(s),s){const l=H.findKey(r,s);l&&(!n||ev(r,r[l],l,n))&&(delete r[l],i=!0)}}return H.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||ev(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return H.forEach(this,(i,o)=>{const s=H.findKey(r,o);if(s){n[s]=qd(i),delete n[o];return}const l=t?v6(o):String(o).trim();l!==o&&delete n[o],n[l]=qd(i),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return H.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&H.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[AE]=this[AE]={accessors:{}}).accessors,i=this.prototype;function o(s){const l=ou(s);r[l]||(g6(i,s),r[l]=!0)}return H.isArray(t)?t.forEach(o):o(t),this}};mn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);H.reduceDescriptors(mn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});H.freezeMethods(mn);const b6="[REDACTED ****]";function x6(e){if(H.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(H.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function w6(e,t){const n=new Set(t.map(o=>String(o).toLowerCase())),r=[],i=o=>{if(o===null||typeof o!="object"||H.isBuffer(o))return o;if(r.indexOf(o)!==-1)return;o instanceof mn&&(o=o.toJSON()),r.push(o);let s;if(H.isArray(o))s=[],o.forEach((l,c)=>{const f=i(l);H.isUndefined(f)||(s[c]=f)});else{if(!H.isPlainObject(o)&&x6(o))return r.pop(),o;s=Object.create(null);for(const[l,c]of Object.entries(o)){const f=n.has(l.toLowerCase())?b6:i(c);H.isUndefined(f)||(s[l]=f)}}return r.pop(),s};return i(e)}let pe=class WD extends Error{static from(t,n,r,i,o,s){const l=new WD(t.message,n||t.code,r,i,o);return Object.defineProperty(l,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),l.name=t.name,t.status!=null&&l.status==null&&(l.status=t.status),s&&Object.assign(l,s),l}constructor(t,n,r,i,o){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),i&&(this.request=i),o&&(this.response=o,this.status=o.status)}toJSON(){const t=this.config,n=t&&H.hasOwnProp(t,"redact")?t.redact:void 0,r=H.isArray(n)&&n.length>0?w6(t,n):H.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};pe.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";pe.ERR_BAD_OPTION="ERR_BAD_OPTION";pe.ECONNABORTED="ECONNABORTED";pe.ETIMEDOUT="ETIMEDOUT";pe.ECONNREFUSED="ECONNREFUSED";pe.ERR_NETWORK="ERR_NETWORK";pe.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";pe.ERR_DEPRECATED="ERR_DEPRECATED";pe.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";pe.ERR_BAD_REQUEST="ERR_BAD_REQUEST";pe.ERR_CANCELED="ERR_CANCELED";pe.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";pe.ERR_INVALID_URL="ERR_INVALID_URL";pe.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const S6=null,HD=100;function Kx(e){return H.isPlainObject(e)||H.isArray(e)}function KD(e){return H.endsWith(e,"[]")?e.slice(0,-2):e}function tv(e,t,n){return e?e.concat(t).map(function(i,o){return i=KD(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function _6(e){return H.isArray(e)&&!e.some(Kx)}const A6=H.toFlatObject(H,{},null,function(t){return/^is[A-Z]/.test(t)});function pp(e,t,n){if(!H.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=H.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(A,O){return!H.isUndefined(O[A])});const r=n.metaTokens,i=n.visitor||S,o=n.dots,s=n.indexes,l=n.Blob||typeof Blob<"u"&&Blob,c=n.maxDepth===void 0?HD:n.maxDepth,f=l&&H.isSpecCompliantForm(t),h=[];if(!H.isFunction(i))throw new TypeError("visitor must be a function");function p(w){if(w===null)return"";if(H.isDate(w))return w.toISOString();if(H.isBoolean(w))return w.toString();if(!f&&H.isBlob(w))throw new pe("Blob is not supported. Use a Buffer instead.");if(H.isArrayBuffer(w)||H.isTypedArray(w)){if(f&&typeof l=="function")return new l([w]);if(typeof Buffer<"u")return Buffer.from(w);throw new pe("Blob is not supported. Use a Buffer instead.",pe.ERR_NOT_SUPPORT)}return w}function y(w){if(w>c)throw new pe("Object is too deeply nested ("+w+" levels). Max depth: "+c,pe.ERR_FORM_DATA_DEPTH_EXCEEDED)}function g(w,A){if(c===1/0)return JSON.stringify(w);const O=[];return JSON.stringify(w,function(P,C){if(!H.isObject(C))return C;for(;O.length&&O[O.length-1]!==this;)O.pop();return O.push(C),y(A+O.length-1),C})}function S(w,A,O){let T=w;if(H.isReactNative(t)&&H.isReactNativeBlob(w))return t.append(tv(O,A,o),p(w)),!1;if(w&&!O&&typeof w=="object"){if(H.endsWith(A,"{}"))A=r?A:A.slice(0,-2),w=g(w,1);else if(H.isArray(w)&&_6(w)||(H.isFileList(w)||H.endsWith(A,"[]"))&&(T=H.toArray(w)))return A=KD(A),T.forEach(function(C,k){!(H.isUndefined(C)||C===null)&&t.append(s===!0?tv([A],k,o):s===null?A:A+"[]",p(C))}),!1}return Kx(w)?!0:(t.append(tv(O,A,o),p(w)),!1)}const b=Object.assign(A6,{defaultVisitor:S,convertValue:p,isVisitable:Kx});function v(w,A,O=0){if(!H.isUndefined(w)){if(y(O),h.indexOf(w)!==-1)throw new Error("Circular reference detected in "+A.join("."));h.push(w),H.forEach(w,function(P,C){(!(H.isUndefined(P)||P===null)&&i.call(t,P,H.isString(C)?C.trim():C,A,b))===!0&&v(P,A?A.concat(C):[C],O+1)}),h.pop()}}if(!H.isObject(e))throw new TypeError("data must be an object");return v(e),t}function OE(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function J1(e,t){this._pairs=[],e&&pp(e,this,t)}const GD=J1.prototype;GD.append=function(t,n){this._pairs.push([t,n])};GD.toString=function(t){const n=t?r=>t.call(this,r,OE):OE;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function O6(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function QD(e,t,n){if(!t)return e;e=e||"";const r=H.isFunction(n)?{serialize:n}:n,i=H.getSafeProp(r,"encode")||O6,o=H.getSafeProp(r,"serialize");let s;if(o?s=o(t,r):s=H.isURLSearchParams(t)?t.toString():new J1(t,r).toString(i),s){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class PE{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){H.forEach(this.handlers,function(r){r!==null&&t(r)})}}const eS={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},P6=typeof URLSearchParams<"u"?URLSearchParams:J1,E6=typeof FormData<"u"?FormData:null,T6=typeof Blob<"u"?Blob:null,C6={isBrowser:!0,classes:{URLSearchParams:P6,FormData:E6,Blob:T6},protocols:["http","https","file","blob","url","data"]},tS=typeof window<"u"&&typeof document<"u",Gx=typeof navigator=="object"&&navigator||void 0,k6=tS&&(!Gx||["ReactNative","NativeScript","NS"].indexOf(Gx.product)<0),R6=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",j6=tS&&window.location.href||"http://localhost",M6=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:tS,hasStandardBrowserEnv:k6,hasStandardBrowserWebWorkerEnv:R6,navigator:Gx,origin:j6},Symbol.toStringTag,{value:"Module"})),en={...M6,...C6};function N6(e,t){return pp(e,new en.classes.URLSearchParams,{visitor:function(n,r,i,o){return en.isNode&&H.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}const EE=HD;function XD(e){if(e>EE)throw new pe("FormData field is too deeply nested ("+e+" levels). Max depth: "+EE,pe.ERR_FORM_DATA_DEPTH_EXCEEDED)}function I6(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;(r=n.exec(e))!==null;)XD(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function D6(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r=n.length;return s=!s&&H.isArray(i)?i.length:s,c?(H.hasOwnProp(i,s)?i[s]=H.isArray(i[s])?i[s].concat(r):[i[s],r]:i[s]=r,!l):((!H.hasOwnProp(i,s)||!H.isObject(i[s]))&&(i[s]=[]),t(n,r,i[s],o)&&H.isArray(i[s])&&(i[s]=D6(i[s])),!l)}if(H.isFormData(e)&&H.isFunction(e.entries)){const n={};return H.forEachEntry(e,(r,i)=>{t(I6(r),i,n,0)}),n}return null}const Ja=(e,t)=>e!=null&&H.hasOwnProp(e,t)?e[t]:void 0;function L6(e,t,n){if(H.isString(e))try{return(t||JSON.parse)(e),H.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Uc={transitional:eS,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=H.isObject(t);if(o&&H.isHTMLForm(t)&&(t=new FormData(t)),H.isFormData(t))return i?JSON.stringify(YD(t)):t;if(H.isArrayBuffer(t)||H.isBuffer(t)||H.isStream(t)||H.isFile(t)||H.isBlob(t)||H.isReadableStream(t))return t;if(H.isArrayBufferView(t))return t.buffer;if(H.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(o){const c=Ja(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return N6(t,c).toString();if((l=H.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=Ja(this,"env"),h=f&&f.FormData;return pp(l?{"files[]":t}:t,h&&new h,c)}}return o||i?(n.setContentType("application/json",!1),L6(t)):t}],transformResponse:[function(t){const n=Ja(this,"transitional")||Uc.transitional,r=n&&n.forcedJSONParsing,i=Ja(this,"responseType"),o=i==="json";if(H.isResponse(t)||H.isReadableStream(t))return t;if(t&&H.isString(t)&&(r&&!i||o)){const l=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,Ja(this,"parseReviver"))}catch(c){if(l)throw c.name==="SyntaxError"?pe.from(c,pe.ERR_BAD_RESPONSE,this,null,Ja(this,"response")):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:en.classes.FormData,Blob:en.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};H.forEach(["delete","get","head","post","put","patch","query"],e=>{Uc.headers[e]={}});function nv(e,t){const n=this||Uc,r=t||n,i=mn.from(r.headers);let o=r.data;return H.forEach(e,function(l){o=l.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function ZD(e){return!!(e&&e.__CANCEL__)}let qc=class extends pe{constructor(t,n,r){super(t??"canceled",pe.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function JD(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new pe("Request failed with status code "+n.status,n.status>=400&&n.status<500?pe.ERR_BAD_REQUEST:pe.ERR_BAD_RESPONSE,n.config,n.request,n))}function $6(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function B6(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,s;return t=t!==void 0?t:1e3,function(c){const f=Date.now(),h=r[o];s||(s=f),n[i]=c,r[i]=f;let p=o,y=0;for(;p!==i;)y+=n[p++],p=p%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),f-s{n=h,i=null,o&&(clearTimeout(o),o=null),e(...f)};return[(...f)=>{const h=Date.now(),p=h-n;p>=r?s(f,h):(i=f,o||(o=setTimeout(()=>{o=null,s(i)},r-p)))},()=>i&&s(i)]}const nh=(e,t,n=3)=>{let r=0;const i=B6(50,250);return F6(o=>{if(!o||typeof o.loaded!="number")return;const s=o.loaded,l=o.lengthComputable?o.total:void 0,c=l!=null?Math.min(s,l):s,f=Math.max(0,c-r),h=i(f);r=Math.max(r,c);const p={loaded:c,total:l,progress:l?c/l:void 0,bytes:f,rate:h||void 0,estimated:h&&l?(l-c)/h:void 0,event:o,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(p)},n)},TE=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},CE=e=>(...t)=>H.asap(()=>e(...t)),U6=en.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,en.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(en.origin),en.navigator&&/(msie|trident)/i.test(en.navigator.userAgent)):()=>!0,q6=en.hasStandardBrowserEnv?{write(e,t,n,r,i,o,s){if(typeof document>"u")return;const l=[`${e}=${encodeURIComponent(t)}`];H.isNumber(n)&&l.push(`expires=${new Date(n).toUTCString()}`),H.isString(r)&&l.push(`path=${r}`),H.isString(i)&&l.push(`domain=${i}`),o===!0&&l.push("secure"),H.isString(s)&&l.push(`SameSite=${s}`),document.cookie=l.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;ne instanceof mn?{...e}:e;function ya(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(h,p,y,g){return H.isPlainObject(h)&&H.isPlainObject(p)?H.merge.call({caseless:g},h,p):H.isPlainObject(p)?H.merge({},p):H.isArray(p)?p.slice():p}function i(h,p,y,g){if(H.isUndefined(p)){if(!H.isUndefined(h))return r(void 0,h,y,g)}else return r(h,p,y,g)}function o(h,p){if(!H.isUndefined(p))return r(void 0,p)}function s(h,p){if(H.isUndefined(p)){if(!H.isUndefined(h))return r(void 0,h)}else return r(void 0,p)}function l(h){const p=H.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!H.isUndefined(p))if(H.isPlainObject(p)){if(H.hasOwnProp(p,h))return p[h]}else return;const y=H.hasOwnProp(e,"transitional")?e.transitional:void 0;if(H.isPlainObject(y)&&H.hasOwnProp(y,h))return y[h]}function c(h,p,y){if(H.hasOwnProp(t,y))return r(h,p);if(H.hasOwnProp(e,y))return r(void 0,h)}const f={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,allowedSocketPaths:s,responseEncoding:s,validateStatus:c,headers:(h,p,y)=>i(RE(h),RE(p),y,!0)};return H.forEach(Object.keys({...e,...t}),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;const y=H.hasOwnProp(f,p)?f[p]:i,g=H.hasOwnProp(e,p)?e[p]:void 0,S=H.hasOwnProp(t,p)?t[p]:void 0,b=y(g,S,p);H.isUndefined(b)&&y!==c||(n[p]=b)}),H.hasOwnProp(t,"validateStatus")&&H.isUndefined(t.validateStatus)&&l("validateStatusUndefinedResolves")===!1&&(H.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const Q6=["content-type","content-length"];function X6(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,i])=>{Q6.includes(r.toLowerCase())&&e.set(r,i)})}const Y6=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function tL(e){const t=ya({},e),n=y=>H.hasOwnProp(t,y)?t[y]:void 0,r=n("data");let i=n("withXSRFToken");const o=n("xsrfHeaderName"),s=n("xsrfCookieName");let l=n("headers");const c=n("auth"),f=n("baseURL"),h=n("allowAbsoluteUrls"),p=n("url");if(t.headers=l=mn.from(l),t.url=QD(eL(f,p,h,t),n("params"),n("paramsSerializer")),c){const y=H.getSafeProp(c,"username")||"",g=H.getSafeProp(c,"password")||"";try{l.set("Authorization","Basic "+btoa(y+":"+(g?Y6(g):"")))}catch(S){throw pe.from(S,pe.ERR_BAD_OPTION_VALUE,e)}}if(H.isFormData(r)&&(en.hasStandardBrowserEnv||en.hasStandardBrowserWebWorkerEnv||H.isReactNative(r)?l.setContentType(void 0):H.isFunction(r.getHeaders)&&X6(l,r.getHeaders(),n("formDataHeaderPolicy"))),en.hasStandardBrowserEnv&&(H.isFunction(i)&&(i=i(t)),i===!0||i==null&&U6(t.url))){const g=o&&s&&q6.read(s);g&&l.set(o,g)}return t}const Z6=typeof XMLHttpRequest<"u",J6=Z6&&function(e){return new Promise(function(n,r){const i=tL(e);let o=i.data;const s=mn.from(i.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:f}=i,h,p,y,g,S;function b(){g&&g(),S&&S(),i.cancelToken&&i.cancelToken.unsubscribe(h),i.signal&&i.signal.removeEventListener("abort",h)}let v=new XMLHttpRequest;v.open(i.method.toUpperCase(),i.url,!0),v.timeout=i.timeout;function w(){if(!v)return;const O=mn.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),P={data:!l||l==="text"||l==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:O,config:e,request:v};JD(function(k){n(k),b()},function(k){r(k),b()},P),v=null}"onloadend"in v?v.onloadend=w:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.startsWith("file:"))||setTimeout(w)},v.onabort=function(){v&&(r(new pe("Request aborted",pe.ECONNABORTED,e,v)),b(),v=null)},v.onerror=function(T){const P=T&&T.message?T.message:"Network Error",C=new pe(P,pe.ERR_NETWORK,e,v);C.event=T||null,r(C),b(),v=null},v.ontimeout=function(){let T=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const P=i.transitional||eS;i.timeoutErrorMessage&&(T=i.timeoutErrorMessage),r(new pe(T,P.clarifyTimeoutError?pe.ETIMEDOUT:pe.ECONNABORTED,e,v)),b(),v=null},o===void 0&&s.setContentType(null),"setRequestHeader"in v&&H.forEach(VD(s),function(T,P){v.setRequestHeader(P,T)}),H.isUndefined(i.withCredentials)||(v.withCredentials=!!i.withCredentials),l&&l!=="json"&&(v.responseType=i.responseType),f&&([y,S]=nh(f,!0),v.addEventListener("progress",y)),c&&v.upload&&([p,g]=nh(c),v.upload.addEventListener("progress",p),v.upload.addEventListener("loadend",g)),(i.cancelToken||i.signal)&&(h=O=>{v&&(r(!O||O.type?new qc(null,e,v):O),v.abort(),b(),v=null)},i.cancelToken&&i.cancelToken.subscribe(h),i.signal&&(i.signal.aborted?h():i.signal.addEventListener("abort",h)));const A=$6(i.url);if(A&&!en.protocols.includes(A)){r(new pe("Unsupported protocol "+A+":",pe.ERR_BAD_REQUEST,e)),b();return}v.send(o||null)})},eW=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const i=function(c){if(!r){r=!0,s();const f=c instanceof Error?c:this.reason;n.abort(f instanceof pe?f:new qc(f instanceof Error?f.message:f))}};let o=t&&setTimeout(()=>{o=null,i(new pe(`timeout of ${t}ms exceeded`,pe.ETIMEDOUT))},t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),e=null)};e.forEach(c=>c.addEventListener("abort",i,{once:!0}));const{signal:l}=n;return l.unsubscribe=()=>H.asap(s),l},tW=function*(e,t){let n=e.byteLength;if(n{const i=nW(e,t);let o=0,s,l=c=>{s||(s=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:f,value:h}=await i.next();if(f){l(),c.close();return}let p=h.byteLength;if(n){let y=o+=p;n(y)}c.enqueue(new Uint8Array(h))}catch(f){throw l(f),f}},cancel(c){return l(c),i.return()}},{highWaterMark:2})},rh=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,iW=(e,t,n)=>t+2g>=2&&r.charCodeAt(g-2)===37&&r.charCodeAt(g-1)===51&&(r.charCodeAt(g)===68||r.charCodeAt(g)===100);f>=0&&(r.charCodeAt(f)===61?(c++,f--):h(f)&&(c++,f-=3)),c===1&&f>=0&&(r.charCodeAt(f)===61||h(f))&&c++;const y=Math.floor(s/4)*3-(c||0);return y>0?y:0}let o=0;for(let s=0,l=r.length;s=55296&&c<=56319&&s+1=56320&&f<=57343?(o+=4,s++):o+=3}else o+=3}return o}const nS="1.18.1",ME=64*1024,{isFunction:gd}=H,aW=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),NE=e=>{if(!H.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},IE=(e,...t)=>{try{return!!e(...t)}catch{return!1}},sW=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},lW=e=>{const t=H.global!==void 0&&H.global!==null?H.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=H.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:i,Request:o,Response:s}=e,l=i?gd(i):typeof fetch=="function",c=gd(o),f=gd(s);if(!l)return!1;const h=l&&gd(n),p=l&&(typeof r=="function"?(w=>A=>w.encode(A))(new r):async w=>new Uint8Array(await new o(w).arrayBuffer())),y=c&&h&&IE(()=>{let w=!1;const A=new o(en.origin,{body:new n,method:"POST",get duplex(){return w=!0,"half"}}),O=A.headers.has("Content-Type");return A.body!=null&&A.body.cancel(),w&&!O}),g=f&&h&&IE(()=>H.isReadableStream(new s("").body)),S={stream:g&&(w=>w.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(w=>{!S[w]&&(S[w]=(A,O)=>{let T=A&&A[w];if(T)return T.call(A);throw new pe(`Response type '${w}' is not supported`,pe.ERR_NOT_SUPPORT,O)})});const b=async w=>{if(w==null)return 0;if(H.isBlob(w))return w.size;if(H.isSpecCompliantForm(w))return(await new o(en.origin,{method:"POST",body:w}).arrayBuffer()).byteLength;if(H.isArrayBufferView(w)||H.isArrayBuffer(w))return w.byteLength;if(H.isURLSearchParams(w)&&(w=w+""),H.isString(w))return(await p(w)).byteLength},v=async(w,A)=>{const O=H.toFiniteNumber(w.getContentLength());return O??b(A)};return async w=>{let{url:A,method:O,data:T,signal:P,cancelToken:C,timeout:k,onDownloadProgress:j,onUploadProgress:N,responseType:U,headers:L,withCredentials:$="same-origin",fetchOptions:G,maxContentLength:F,maxBodyLength:X}=tL(w);const J=H.isNumber(F)&&F>-1,ee=H.isNumber(X)&&X>-1,Q=ce=>H.hasOwnProp(w,ce)?w[ce]:void 0;let ne=i||fetch;U=U?(U+"").toLowerCase():"text";let V=eW([P,C&&C.toAbortSignal()],k),D=null;const K=V&&V.unsubscribe&&(()=>{V.unsubscribe()});let ae,he=null;const me=()=>new pe("Request body larger than maxBodyLength limit",pe.ERR_BAD_REQUEST,w,D);try{let ce;const Ee=Q("auth");if(Ee){const xe=H.getSafeProp(Ee,"username")||"",Qe=H.getSafeProp(Ee,"password")||"";ce={username:xe,password:Qe}}if(sW(A)){const xe=new URL(A,en.origin);if(!ce&&(xe.username||xe.password)){const Qe=NE(xe.username),Tt=NE(xe.password);ce={username:Qe,password:Tt}}(xe.username||xe.password)&&(xe.username="",xe.password="",A=xe.href)}if(ce&&(L.delete("authorization"),L.set("Authorization","Basic "+btoa(aW((ce.username||"")+":"+(ce.password||""))))),J&&typeof A=="string"&&A.startsWith("data:")&&oW(A)>F)throw new pe("maxContentLength size of "+F+" exceeded",pe.ERR_BAD_RESPONSE,w,D);if(ee&&O!=="get"&&O!=="head"){const xe=await b(T);if(typeof xe=="number"&&isFinite(xe)&&(ae=xe,xe>X))throw me()}const Te=ee&&(H.isReadableStream(T)||H.isStream(T)),ie=(xe,Qe,Tt)=>jE(xe,ME,Ft=>{if(ee&&Ft>X)throw he=me();Qe&&Qe(Ft)},Tt);if(y&&O!=="get"&&O!=="head"&&(N||Te)){if(ae=ae??await v(L,T),ae!==0||Te){let xe=new o(A,{method:"POST",body:T,duplex:"half"}),Qe;if(H.isFormData(T)&&(Qe=xe.headers.get("content-type"))&&L.setContentType(Qe),xe.body){const[Tt,Ft]=N&&TE(ae,nh(CE(N)))||[];T=ie(xe.body,Tt,Ft)}}}else if(Te&&!c&&h&&O!=="get"&&O!=="head")T=ie(T);else if(Te&&c&&!y&&O!=="get"&&O!=="head")throw new pe("Stream request bodies are not supported by the current fetch implementation",pe.ERR_NOT_SUPPORT,w,D);H.isString($)||($=$?"include":"omit");const Oe=c&&"credentials"in o.prototype;if(H.isFormData(T)){const xe=L.getContentType();xe&&/^multipart\/form-data/i.test(xe)&&!/boundary=/i.test(xe)&&L.delete("content-type")}L.set("User-Agent","axios/"+nS,!1);const Ce={...G,signal:V,method:O.toUpperCase(),headers:VD(L.normalize()),body:T,duplex:"half",credentials:Oe?$:void 0};D=c&&new o(A,Ce);let oe=await(c?ne(D,G):ne(A,Ce));const He=mn.from(oe.headers);if(J){const xe=H.toFiniteNumber(He.getContentLength());if(xe!=null&&xe>F)throw new pe("maxContentLength size of "+F+" exceeded",pe.ERR_BAD_RESPONSE,w,D)}const De=g&&(U==="stream"||U==="response");if(g&&oe.body&&(j||J||De&&K)){const xe={};["status","statusText","headers"].forEach(Kt=>{xe[Kt]=oe[Kt]});const Qe=H.toFiniteNumber(He.getContentLength()),[Tt,Ft]=j&&TE(Qe,nh(CE(j),!0))||[];let Mn=0;const nn=Kt=>{if(J&&(Mn=Kt,Mn>F))throw new pe("maxContentLength size of "+F+" exceeded",pe.ERR_BAD_RESPONSE,w,D);Tt&&Tt(Kt)};oe=new s(jE(oe.body,ME,nn,()=>{Ft&&Ft(),K&&K()}),xe)}U=U||"text";let Ge=await S[H.findKey(S,U)||"text"](oe,w);if(J&&!g&&!De){let xe;if(Ge!=null&&(typeof Ge.byteLength=="number"?xe=Ge.byteLength:typeof Ge.size=="number"?xe=Ge.size:typeof Ge=="string"&&(xe=typeof r=="function"?new r().encode(Ge).byteLength:Ge.length)),typeof xe=="number"&&xe>F)throw new pe("maxContentLength size of "+F+" exceeded",pe.ERR_BAD_RESPONSE,w,D)}return!De&&K&&K(),await new Promise((xe,Qe)=>{JD(xe,Qe,{data:Ge,headers:mn.from(oe.headers),status:oe.status,statusText:oe.statusText,config:w,request:D})})}catch(ce){if(K&&K(),V&&V.aborted&&V.reason instanceof pe){const Ee=V.reason;throw Ee.config=w,D&&(Ee.request=D),ce!==Ee&&Object.defineProperty(Ee,"cause",{__proto__:null,value:ce,writable:!0,enumerable:!1,configurable:!0}),Ee}if(he)throw D&&!he.request&&(he.request=D),he;if(ce instanceof pe)throw D&&!ce.request&&(ce.request=D),ce;if(ce&&ce.name==="TypeError"&&/Load failed|fetch/i.test(ce.message)){const Ee=new pe("Network Error",pe.ERR_NETWORK,w,D,ce&&ce.response);throw Object.defineProperty(Ee,"cause",{__proto__:null,value:ce.cause||ce,writable:!0,enumerable:!1,configurable:!0}),Ee}throw pe.from(ce,ce&&ce.code,w,D,ce&&ce.response)}}},uW=new Map,nL=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:i}=t,o=[r,i,n];let s=o.length,l=s,c,f,h=uW;for(;l--;)c=o[l],f=h.get(c),f===void 0&&h.set(c,f=l?new Map:lW(t)),h=f;return f};nL();const rS={http:S6,xhr:J6,fetch:{get:nL}};H.forEach(rS,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const DE=e=>`- ${e}`,cW=e=>H.isFunction(e)||e===null||e===!1;function fW(e,t){e=H.isArray(e)?e:[e];const{length:n}=e;let r,i;const o={};for(let s=0;s`adapter ${c} `+(f===!1?"is not supported by the environment":"is not available in the build"));let l=n?s.length>1?`since : `+s.map(DE).join(` `):" "+DE(s[0]):"as no adapter specified";throw new pe("There is no suitable adapter to dispatch the request "+l,pe.ERR_NOT_SUPPORT)}return i}const rL={getAdapter:fW,adapters:rS};function rv(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new qc(null,e)}function LE(e){return rv(e),e.headers=mn.from(e.headers),e.data=nv.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),rL.getAdapter(e.adapter||Uc.adapter,e)(e).then(function(r){rv(e),e.response=r;try{r.data=nv.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=mn.from(r.headers),r},function(r){if(!ZD(r)&&(rv(e),r&&r.response)){e.response=r.response;try{r.response.data=nv.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=mn.from(r.response.headers)}return Promise.reject(r)})}const mp={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{mp[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const $E={};mp.transitional=function(t,n,r){function i(o,s){return"[Axios v"+nS+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,l)=>{if(t===!1)throw new pe(i(s," has been removed"+(n?" in "+n:"")),pe.ERR_DEPRECATED);return n&&!$E[s]&&($E[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,s,l):!0}};mp.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function dW(e,t,n){if(typeof e!="object"||e===null)throw new pe("options must be an object",pe.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],s=Object.prototype.hasOwnProperty.call(t,o)?t[o]:void 0;if(s){const l=e[o],c=l===void 0||s(l,o,e);if(c!==!0)throw new pe("option "+o+" must be "+c,pe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new pe("Unknown option "+o,pe.ERR_BAD_OPTION)}}const zd={assertOptions:dW,validators:mp},ln=zd.validators;let sa=class{constructor(t){this.defaults=t||{},this.interceptors={request:new PE,response:new PE}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=(()=>{if(!i.stack)return"";const s=i.stack.indexOf(` `);return s===-1?"":i.stack.slice(s+1)})();try{if(!r.stack)r.stack=o;else if(o){const s=o.indexOf(` `),l=s===-1?-1:o.indexOf(` `,s+1),c=l===-1?"":o.slice(l+1);String(r.stack).endsWith(c)||(r.stack+=` `+o)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ya(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&zd.assertOptions(r,{silentJSONParsing:ln.transitional(ln.boolean),forcedJSONParsing:ln.transitional(ln.boolean),clarifyTimeoutError:ln.transitional(ln.boolean),legacyInterceptorReqResOrdering:ln.transitional(ln.boolean),advertiseZstdAcceptEncoding:ln.transitional(ln.boolean),validateStatusUndefinedResolves:ln.transitional(ln.boolean)},!1),i!=null&&(H.isFunction(i)?n.paramsSerializer={serialize:i}:zd.assertOptions(i,{encode:ln.function,serialize:ln.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),zd.assertOptions(n,{baseUrl:ln.spelling("baseURL"),withXsrfToken:ln.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&H.merge(o.common,o[n.method]);o&&H.forEach(["delete","get","head","post","put","patch","query","common"],S=>{delete o[S]}),n.headers=mn.concat(s,o);const l=[];let c=!0;this.interceptors.request.forEach(function(b){if(typeof b.runWhen=="function"&&b.runWhen(n)===!1)return;c=c&&b.synchronous;const v=n.transitional||eS;v&&v.legacyInterceptorReqResOrdering?l.unshift(b.fulfilled,b.rejected):l.push(b.fulfilled,b.rejected)});const f=[];this.interceptors.response.forEach(function(b){f.push(b.fulfilled,b.rejected)});let h,p=0,y;if(!c){const S=[LE.bind(this),void 0];for(S.unshift(...l),S.push(...f),y=S.length,h=Promise.resolve(n);p{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(l=>{r.subscribe(l),o=l}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},t(function(o,s,l){r.reason||(r.reason=new qc(o,s,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new iL(function(i){t=i}),cancel:t}}};function pW(e){return function(n){return e.apply(null,n)}}function mW(e){return H.isObject(e)&&e.isAxiosError===!0}const Qx={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Qx).forEach(([e,t])=>{Qx[t]=e});function oL(e){const t=new sa(e),n=ID(sa.prototype.request,t);return H.extend(n,sa.prototype,t,{allOwnKeys:!0}),H.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return oL(ya(e,i))},n}const Et=oL(Uc);Et.Axios=sa;Et.CanceledError=qc;Et.CancelToken=hW;Et.isCancel=ZD;Et.VERSION=nS;Et.toFormData=pp;Et.AxiosError=pe;Et.Cancel=Et.CanceledError;Et.all=function(t){return Promise.all(t)};Et.spread=pW;Et.isAxiosError=mW;Et.mergeConfig=ya;Et.AxiosHeaders=mn;Et.formToJSON=e=>YD(H.isHTMLForm(e)?new FormData(e):e);Et.getAdapter=rL.getAdapter;Et.HttpStatusCode=Qx;Et.default=Et;const{Axios:She,AxiosError:_he,CanceledError:Ahe,isCancel:Ohe,CancelToken:Phe,VERSION:Ehe,all:The,Cancel:Che,isAxiosError:khe,spread:Rhe,toFormData:jhe,AxiosHeaders:Mhe,HttpStatusCode:Nhe,formToJSON:Ihe,getAdapter:Dhe,mergeConfig:Lhe,create:$he}=Et,aL=typeof window>"u",BE=!aL&&window.self!==window.top,yW=!aL&&typeof document>"u",iv=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),Xt=[];for(let e=0;e<256;++e)Xt.push((e+256).toString(16).slice(1));function vW(e,t=0){return(Xt[e[t+0]]+Xt[e[t+1]]+Xt[e[t+2]]+Xt[e[t+3]]+"-"+Xt[e[t+4]]+Xt[e[t+5]]+"-"+Xt[e[t+6]]+Xt[e[t+7]]+"-"+Xt[e[t+8]]+Xt[e[t+9]]+"-"+Xt[e[t+10]]+Xt[e[t+11]]+Xt[e[t+12]]+Xt[e[t+13]]+Xt[e[t+14]]+Xt[e[t+15]]).toLowerCase()}let ov;const gW=new Uint8Array(16);function bW(){if(!ov){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");ov=crypto.getRandomValues.bind(crypto)}return ov(gW)}const xW=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),FE={randomUUID:xW};function wW(e,t,n){var i;e=e||{};const r=e.random??((i=e.rng)==null?void 0:i.call(e))??bW();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,vW(r)}function SW(e,t,n){return FE.randomUUID&&!e?FE.randomUUID():wW(e)}const au=typeof window<"u"?window:{base44SharedInstances:{}};function _W(e,t){return au.base44SharedInstances||(au.base44SharedInstances={}),au.base44SharedInstances[e]||(au.base44SharedInstances[e]={instance:t()}),au.base44SharedInstances[e].instance}const AW="__user_heartbeat_event__",OW="__initialization_event__",PW="__session_duration_event__",UE="analytics-enable",qE="base44_analytics_session_id",EW={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:60*1e3},TW="analytics",at=_W(TW,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,config:{...EW,...DW()}})),CW=({axiosClient:e,serverUrl:t,appId:n,userAuthModule:r})=>{var i;const{maxQueueSize:o,throttleTime:s,batchSize:l}=at.config;if(!(!((i=at.config)===null||i===void 0)&&i.enabled)||yW)return{track:()=>{},cleanup:()=>{}};let c;const f=`${t}/api/apps/${n}/analytics/track/batch`,h=async O=>{await e.request({method:"POST",url:`/apps/${n}/analytics/track/batch`,data:{events:O}})},p=O=>{try{const T=JSON.stringify({events:O}),P=new Blob([T],{type:"application/json"});return typeof navigator>"u"||T.length>6e4||!navigator.sendBeacon(f,P)}catch{return!1}},y=async(O,T={})=>{if(O.length===0)return;const P=await IW(r),C=O.map(NW(P));try{(!T.isBeacon||!p(C))&&await h(C)}catch{}},g=()=>{VE(y,{throttleTime:s,batchSize:l})},S=O=>{if(at.requestsQueue.length>=o)return;const T=MW();at.requestsQueue.push({...O,...T}),g()},b=()=>{VE(y,{throttleTime:s,batchSize:l}),c=WE(S),RW()},v=()=>{zE(),c==null||c(),jW(S);const O=at.requestsQueue.splice(0);y(O,{isBeacon:!0})},w=()=>{typeof window>"u"||(document.visibilityState==="hidden"?v():document.visibilityState==="visible"&&b())},A=()=>{zE(),c==null||c(),typeof window<"u"&&window.removeEventListener("visibilitychange",w)};return g(),c=WE(S),kW(S),typeof window<"u"&&window.addEventListener("visibilitychange",w),{track:S,cleanup:A}};function zE(){at.isProcessing=!1}async function VE(e,t){if(at.isProcessing)return;at.isProcessing=!0;const{throttleTime:n=1e3,batchSize:r=30}=t??{};for(;at.isProcessing&&at.requestsQueue.length>0;){const i=at.requestsQueue.splice(0,r);i.length&&await e(i),await new Promise(o=>setTimeout(o,n))}at.isProcessing=!1}function WE(e){var t;if(at.isHeartBeatProcessing||((t=at.config.heartBeatInterval)!==null&&t!==void 0?t:0)<10)return()=>{};at.isHeartBeatProcessing=!0;const n=setInterval(()=>{e({eventName:AW})},at.config.heartBeatInterval);return()=>{clearInterval(n),at.isHeartBeatProcessing=!1}}function kW(e){typeof window>"u"||at.wasInitializationTracked||(at.wasInitializationTracked=!0,e({eventName:OW,properties:{referrer:document==null?void 0:document.referrer}}))}function RW(){typeof window>"u"||at.sessionStartTime!==null||(at.sessionStartTime=new Date().toISOString())}function jW(e){if(typeof window>"u"||at.sessionStartTime===null)return;const t=new Date().getTime()-new Date(at.sessionStartTime).getTime();at.sessionStartTime=null,e({eventName:PW,properties:{sessionDuration:t}})}function MW(){return{timestamp:new Date().toISOString(),pageUrl:typeof window<"u"?window.location.pathname:null}}function NW(e){return t=>({event_name:t.eventName,properties:t.properties,timestamp:t.timestamp,page_url:t.pageUrl,...e})}let av=null;async function IW(e){if(!at.sessionContext){if(!av){const t=iS();av=e.me().then(n=>({user_id:n.id,session_id:t})).catch(()=>({user_id:null,session_id:t}))}at.sessionContext=await av}return at.sessionContext}function DW(){if(typeof window>"u"||!window.location)return;const t=new URLSearchParams(window.location.search).get(UE);if(t==null||!t.length)return;const n=new URLSearchParams(window.location.search);n.delete(UE);const r=window.location.pathname+(n.toString()?"?"+n.toString():"");return window.history.replaceState({},"",r),{enabled:t==="true"}}function iS(){if(typeof window>"u")return iv();try{const e=localStorage.getItem(qE);if(!e){const t=iv();return localStorage.setItem(qE,t),t}return e}catch{return iv()}}class LW extends Error{constructor(t,n,r,i,o){super(t),this.name="Base44Error",this.status=n,this.code=r,this.data=i,this.originalError=o}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}}function bu({baseURL:e,headers:t={},token:n,interceptResponses:r=!0,onError:i}){const o=Et.create({baseURL:e,headers:{"Content-Type":"application/json",Accept:"application/json",...t}});return n&&(o.defaults.headers.common.Authorization=`Bearer ${n}`),o.interceptors.request.use(s=>{typeof window<"u"&&window.location&&(s.headers.set("X-Origin-URL",window.location.href),s.headers.get("Authorization")||s.headers.set("X-Base44-Anonymous-Id",iS()));const l=SW();if(s.requestId=l,BE)try{window.parent.postMessage({type:"api-request-start",requestId:l,data:{url:e+s.url,method:s.method,body:s.data instanceof FormData?"[FormData object]":s.data}},"*")}catch{}return s}),r&&o.interceptors.response.use(s=>{var l;const c=(l=s.config)===null||l===void 0?void 0:l.requestId;try{BE&&c&&window.parent.postMessage({type:"api-request-end",requestId:c,data:{statusCode:s.status,response:s.data}},"*")}catch{}return s.data},s=>{var l,c,f,h,p,y,g,S;const b=((c=(l=s.response)===null||l===void 0?void 0:l.data)===null||c===void 0?void 0:c.message)||((h=(f=s.response)===null||f===void 0?void 0:f.data)===null||h===void 0?void 0:h.detail)||s.message,v=new LW(b,(p=s.response)===null||p===void 0?void 0:p.status,(g=(y=s.response)===null||y===void 0?void 0:y.data)===null||g===void 0?void 0:g.code,(S=s.response)===null||S===void 0?void 0:S.data,s);return i==null||i(v),Promise.reject(v)}),o}function HE(e){const{axios:t,appId:n,getSocket:r}=e;return new Proxy({},{get(i,o){if(!(typeof o!="string"||o==="then"||o.startsWith("_")))return BW(t,n,o,r)}})}function $W(e){var t;try{const n=JSON.parse(e);return{type:n.type,data:n.data,id:n.id||((t=n.data)===null||t===void 0?void 0:t.id),timestamp:n.timestamp||new Date().toISOString()}}catch(n){return console.warn("[Base44 SDK] Failed to parse realtime message:",n),null}}function BW(e,t,n,r){const i=`/apps/${t}/entities/${n}`;return{async list(o,s,l,c){const f={};return o&&(f.sort=o),s&&(f.limit=s),l&&(f.skip=l),c&&(f.fields=Array.isArray(c)?c.join(","):c),e.get(i,{params:f})},async filter(o,s,l,c,f){const h={q:JSON.stringify(o)};return s&&(h.sort=s),l&&(h.limit=l),c&&(h.skip=c),f&&(h.fields=Array.isArray(f)?f.join(","):f),e.get(i,{params:h})},async get(o){return e.get(`${i}/${o}`)},async create(o){return e.post(i,o)},async update(o,s){return e.put(`${i}/${o}`,s)},async delete(o){return e.delete(`${i}/${o}`)},async deleteMany(o){return e.delete(i,{data:o})},async bulkCreate(o){return e.post(`${i}/bulk`,o)},async updateMany(o,s){return e.patch(`${i}/update-many`,{query:o,data:s})},async bulkUpdate(o){return e.put(`${i}/bulk`,o)},async importEntities(o){const s=new FormData;return s.append("file",o,o.name),e.post(`${i}/import`,s,{headers:{"Content-Type":"multipart/form-data"}})},subscribe(o){const s=`entities:${t}:${n}`;return r().subscribeToRoom(s,{update_model:f=>{var h;const p=$W(f.data);if(p){p.type!=="delete"&&(!((h=p.data)===null||h===void 0)&&h._oversize)&&console.error(`[Base44 SDK] Realtime broadcast for ${n}#${p.id} was oversize and got slimmed for transport. Fields >10 KB are empty and the rest of the record may be a stub. Call \`entities.${n}.get("${p.id}")\` to fetch the full record.`);try{o(p)}catch(y){console.error("[Base44 SDK] Subscription callback error:",y)}}}})}}}function FW(e,t){return{async call(n,r,i){if(!(n!=null&&n.trim()))throw new Error("Integration slug is required and cannot be empty");if(!(r!=null&&r.trim()))throw new Error("Operation ID is required and cannot be empty");const{pathParams:o,queryParams:s,...l}=i??{},c={...l,...o&&{path_params:o},...s&&{query_params:s}};return await e.post(`/apps/${t}/integrations/custom/${n}/${r}`,c)}}}function KE(e,t){const n=FW(e,t);return new Proxy({},{get(r,i){if(!(typeof i!="string"||i==="then"||i.startsWith("_")))return i==="custom"?n:new Proxy({},{get(o,s){if(!(typeof s!="string"||s==="then"||s.startsWith("_")))return async l=>{if(typeof l=="string")throw new Error(`Integration ${s} must receive an object with named parameters, received: ${l}`);let c,f;return l instanceof FormData||l&&Object.values(l).some(h=>h instanceof File)?(c=new FormData,Object.keys(l).forEach(h=>{l[h]instanceof File?c.append(h,l[h],l[h].name):typeof l[h]=="object"&&l[h]!==null?c.append(h,JSON.stringify(l[h])):c.append(h,l[h])}),f="multipart/form-data"):(c=l,f="application/json"),i==="Core"?e.post(`/apps/${t}/integration-endpoints/Core/${s}`,c||l,{headers:{"Content-Type":f}}):e.post(`/apps/${t}/integration-endpoints/installable/${i}/integration-endpoints/${s}`,c||l,{headers:{"Content-Type":f}})}}})}})}function UW(){return typeof window>"u"?!1:window!==window.parent}function qW(e,t,n){const o=Math.round(window.screenX+(window.outerWidth-500)/2),s=Math.round(window.screenY+(window.outerHeight-600)/2),l=window.open(e,"base44_auth",`width=500,height=600,left=${o},top=${s},resizable=yes,scrollbars=yes`);if(!l)return;const c=()=>{window.removeEventListener("message",f),clearInterval(h),l.closed||l.close()},f=p=>{var y;if(p.origin!==n||p.source!==l||!(!((y=p.data)===null||y===void 0)&&y.access_token))return;c();const g=new URL(t),{access_token:S,is_new_user:b}=p.data;g.searchParams.set("access_token",S),b!=null&&g.searchParams.set("is_new_user",String(b)),window.location.href=g.toString()},h=setInterval(()=>{l.closed&&c()},500);window.addEventListener("message",f)}function zW(e,t,n,r){return{async me(){return e.get(`/apps/${n}/entities/User/me`)},async updateMe(i){return e.put(`/apps/${n}/entities/User/me`,i)},redirectToLogin(i){if(typeof window>"u")throw new Error("Login method can only be used in a browser environment");const o=i?new URL(i,window.location.origin).toString():window.location.href,s=`${r.appBaseUrl}/login?from_url=${encodeURIComponent(o)}`;window.location.href=s},loginWithProvider(i,o="/"){const s=new URL(o,window.location.origin).toString(),l=`app_id=${n}&from_url=${encodeURIComponent(s)}`;let c;i==="sso"?c=`/apps/${n}/auth/sso/login`:c=`/apps/auth${i==="google"?"":`/${i}`}/login`;const f=`${r.appBaseUrl}/api${c}?${l}`;if(UW()){const h=`${f}&popup_origin=${encodeURIComponent(window.location.origin)}`;return qW(h,s,window.location.origin)}window.location.href=f},logout(i){if(delete e.defaults.headers.common.Authorization,typeof window<"u"){if(window.localStorage)try{window.localStorage.removeItem("base44_access_token"),window.localStorage.removeItem("token")}catch(l){console.error("Failed to remove token from localStorage:",l)}const o=i||window.location.href,s=`${r.appBaseUrl}/api/apps/auth/logout?from_url=${encodeURIComponent(o)}`;window.location.href=s}},setToken(i,o=!0){if(i&&(e.defaults.headers.common.Authorization=`Bearer ${i}`,t.defaults.headers.common.Authorization=`Bearer ${i}`,o&&typeof window<"u"&&window.localStorage))try{window.localStorage.setItem("base44_access_token",i),window.localStorage.setItem("token",i)}catch(s){console.error("Failed to save token to localStorage:",s)}},async loginViaEmailPassword(i,o,s){var l;try{const c=await e.post(`/apps/${n}/auth/login`,{email:i,password:o,...s&&{turnstile_token:s}}),{access_token:f,user:h}=c;return f&&this.setToken(f),{access_token:f,user:h}}catch(c){throw((l=c.response)===null||l===void 0?void 0:l.status)===401&&await this.logout(),c}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(i,o){return e.post(`/apps/${n}/users/invite-user`,{user_email:i,role:o})},register(i){return e.post(`/apps/${n}/auth/register`,i)},verifyOtp({email:i,otpCode:o}){return e.post(`/apps/${n}/auth/verify-otp`,{email:i,otp_code:o})},resendOtp(i){return e.post(`/apps/${n}/auth/resend-otp`,{email:i})},resetPasswordRequest(i){return e.post(`/apps/${n}/auth/reset-password-request`,{email:i})},resetPassword({resetToken:i,newPassword:o}){return e.post(`/apps/${n}/auth/reset-password`,{reset_token:i,new_password:o})},changePassword({userId:i,currentPassword:o,newPassword:s}){return e.post(`/apps/${n}/auth/change-password`,{user_id:i,current_password:o,new_password:s})}}}function VW(e,t){return{async getAccessToken(n){const r=`/apps/${t}/auth/sso/accesstoken/${n}`;return e.get(r)},async getIdToken(n){const r=`/apps/${t}/auth/sso/idtoken/${n}`;return e.get(r)}}}function WW(e,t){return{async getAccessToken(n){if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");return(await e.get(`/apps/${t}/external-auth/tokens/${n}`)).access_token},async getConnection(n){var r;if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");const o=await e.get(`/apps/${t}/external-auth/tokens/${n}`);return{accessToken:o.access_token,connectionConfig:(r=o.connection_config)!==null&&r!==void 0?r:null}},async getWorkspaceConnection(n){var r;if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");const o=await e.get(`/apps/${t}/external-auth/tokens/connectors/${n}`);return{accessToken:o.access_token,connectionConfig:(r=o.connection_config)!==null&&r!==void 0?r:null}},async getCurrentAppUserAccessToken(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");return(await e.get(`/apps/${t}/app-user-auth/connectors/${n}/token`)).access_token},async getCurrentAppUserConnection(n){var r;if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");const o=await e.get(`/apps/${t}/app-user-auth/connectors/${n}/token`);return{accessToken:o.access_token,connectionConfig:(r=o.connection_config)!==null&&r!==void 0?r:null}}}}function HW(e,t){return{async connectAppUser(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");return(await e.post(`/apps/${t}/app-user-auth/connectors/${n}/initiate`)).redirect_url},async disconnectAppUser(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");await e.delete(`/apps/${t}/app-user-auth/connectors/${n}`)}}}function la(e={}){const{storageKey:t="base44_access_token",paramName:n="access_token",saveToStorage:r=!0,removeFromUrl:i=!0}=e;let o=null;if(typeof window<"u"&&window.location)try{const s=new URLSearchParams(window.location.search);if(o=s.get(n),o){if(r&&KW(o,{storageKey:t}),i){s.delete(n);const l=`${window.location.pathname}${s.toString()?`?${s.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,l)}return o}}catch(s){console.error("Error retrieving token from URL:",s)}if(typeof window<"u"&&window.localStorage)try{return o=window.localStorage.getItem(t),o}catch(s){console.error("Error retrieving token from local storage:",s)}return null}function KW(e,t){const{storageKey:n="base44_access_token"}=t;if(typeof window>"u"||!window.localStorage||!e)return!1;try{return window.localStorage.setItem(n,e),window.localStorage.setItem("token",e),!0}catch(r){return console.error("Error saving token to local storage:",r),!1}}function GE(e,t,n){const r=(o,s)=>o?`${String(o).replace(/\/$/,"")}${s}`:s,i=o=>{const s=new Headers;if(n!=null&&n.getAuthHeaders){const l=n.getAuthHeaders();Object.entries(l).forEach(([c,f])=>{f!=null&&s.set(c,String(f))})}return o&&new Headers(o).forEach((l,c)=>{s.set(c,l)}),s};return{async invoke(o,s){if(typeof s=="string")throw new Error(`Function ${o} must receive an object with named parameters, received: ${s}`);let l,c;return s instanceof FormData||s&&Object.values(s).some(f=>f instanceof File)?(l=new FormData,Object.keys(s).forEach(f=>{s[f]instanceof File?l.append(f,s[f],s[f].name):typeof s[f]=="object"&&s[f]!==null?l.append(f,JSON.stringify(s[f])):l.append(f,s[f])}),c="multipart/form-data"):(l=s,c="application/json"),e.post(`/apps/${t}/functions/${o}`,l||s,{headers:{"Content-Type":c}})},async fetch(o,s={}){const c=`/functions${o.startsWith("/")?o:`/${o}`}`,f=i(s.headers),h={...s,headers:f};return await fetch(r(n==null?void 0:n.baseURL,c),h)}}}function QE({axios:e,getSocket:t,appId:n,serverUrl:r,token:i}){const o=`/apps/${n}/agents`,s={},l=()=>e.get(`${o}/conversations`),c=b=>e.get(`${o}/conversations/${b}`);return{getConversations:l,getConversation:c,listConversations:b=>e.get(`${o}/conversations`,{params:b}),createConversation:b=>e.post(`${o}/conversations`,b),addMessage:async(b,v)=>e.post(`${o}/conversations/v2/${b.id}/messages`,v),subscribeToConversation:(b,v)=>{const w=`/agent-conversations/${b}`,A=t(),O=c(b).then(T=>(s[b]=T,T));return A.subscribeToRoom(w,{connect:()=>{},update_model:async({data:T})=>{const P=JSON.parse(T);if(P._message){await O;const C=P._message,k=s[b];if(k){const j=k.messages||[],N=j.findIndex(L=>L.id===C.id),U=N!==-1?j.map((L,$)=>$===N?C:L):[...j,C];s[b]={...k,messages:U},v==null||v(s[b])}}}})},getWhatsAppConnectURL:b=>{const v=`${r}/api/apps/${n}/agents/${encodeURIComponent(b)}/whatsapp`,w=i??la();return w?`${v}?token=${w}`:v},getTelegramConnectURL:b=>{const v=`${r}/api/apps/${n}/agents/${encodeURIComponent(b)}/telegram`,w=i??la();return w?`${v}?token=${w}`:v}}}function XE({serverUrl:e,token:t,appId:n}){return{connection:()=>{var i;return{baseURL:`${e}/api/apps/${n}/ai/openai/v1`,token:(i=t??la())!==null&&i!==void 0?i:""}}}}function YE(e,t){const n=`/app-logs/${t}`;return{async logUserInApp(r){await e.post(`${n}/log-user-in-app/${r}`)},async fetchLogs(r={}){return await e.get(n,{params:r})},async getStats(r={}){return await e.get(`${n}/stats`,{params:r})}}}function GW(e,t){return{async inviteUser(n,r){if(r!=="user"&&r!=="admin")throw new Error(`Invalid role: "${r}". Role must be either "user" or "admin".`);return await e.post(`/apps/${t}/runtime/users/invite-user`,{user_email:n,role:r})}}}const Vr=Object.create(null);Vr.open="0";Vr.close="1";Vr.ping="2";Vr.pong="3";Vr.message="4";Vr.upgrade="5";Vr.noop="6";const Vd=Object.create(null);Object.keys(Vr).forEach(e=>{Vd[Vr[e]]=e});const Xx={type:"error",data:"parser error"},sL=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",lL=typeof ArrayBuffer=="function",uL=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,oS=({type:e,data:t},n,r)=>sL&&t instanceof Blob?n?r(t):ZE(t,r):lL&&(t instanceof ArrayBuffer||uL(t))?n?r(t):ZE(new Blob([t]),r):r(Vr[e]+(t||"")),ZE=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function JE(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let sv;function QW(e,t){if(sL&&e.data instanceof Blob)return e.data.arrayBuffer().then(JE).then(t);if(lL&&(e.data instanceof ArrayBuffer||uL(e.data)))return t(JE(e.data));oS(e,!1,n=>{sv||(sv=new TextEncoder),t(sv.encode(n))})}const eT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xu=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,s,l,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const f=new ArrayBuffer(t),h=new Uint8Array(f);for(r=0;r>4,h[i++]=(s&15)<<4|l>>2,h[i++]=(l&3)<<6|c&63;return f},YW=typeof ArrayBuffer=="function",aS=(e,t)=>{if(typeof e!="string")return{type:"message",data:cL(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:ZW(e.substring(1),t)}:Vd[n]?e.length>1?{type:Vd[n],data:e.substring(1)}:{type:Vd[n]}:Xx},ZW=(e,t)=>{if(YW){const n=XW(e);return cL(n,t)}else return{base64:!0,data:e}},cL=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},fL="",JW=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,s)=>{oS(o,!1,l=>{r[s]=l,++i===n&&t(r.join(fL))})})},eH=(e,t)=>{const n=e.split(fL),r=[];for(let i=0;i{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const o=new DataView(i.buffer);o.setUint8(0,126),o.setUint16(1,r)}else{i=new Uint8Array(9);const o=new DataView(i.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let lv;function bd(e){return e.reduce((t,n)=>t+n.length,0)}function xd(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;iMath.pow(2,21)-1){l.enqueue(Xx);break}i=h*Math.pow(2,32)+f.getUint32(4),r=3}else{if(bd(n)e){l.enqueue(Xx);break}}}})}const dL=4;function Rt(e){if(e)return rH(e)}function rH(e){for(var t in Rt.prototype)e[t]=Rt.prototype[t];return e}Rt.prototype.on=Rt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Rt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Rt.prototype.off=Rt.prototype.removeListener=Rt.prototype.removeAllListeners=Rt.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;iPromise.resolve().then(t):(t,n)=>n(t,0),ir=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),iH="arraybuffer";function hL(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const oH=ir.setTimeout,aH=ir.clearTimeout;function vp(e,t){t.useNativeTimers?(e.setTimeoutFn=oH.bind(ir),e.clearTimeoutFn=aH.bind(ir)):(e.setTimeoutFn=ir.setTimeout.bind(ir),e.clearTimeoutFn=ir.clearTimeout.bind(ir))}const sH=1.33;function lH(e){return typeof e=="string"?uH(e):Math.ceil((e.byteLength||e.size)*sH)}function uH(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}function pL(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function cH(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function fH(e){let t={},n=e.split("&");for(let r=0,i=n.length;r{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};eH(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,JW(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=pL()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let mL=!1;try{mL=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const pH=mL;function mH(){}class yH extends hH{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Br extends Rt{constructor(t,n,r){super(),this.createRequest=t,vp(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=hL(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=Br.requestsCount++,Br.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=mH,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Br.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Br.requestsCount=0;Br.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",tT);else if(typeof addEventListener=="function"){const e="onpagehide"in ir?"pagehide":"unload";addEventListener(e,tT,!1)}}function tT(){for(let e in Br.requests)Br.requests.hasOwnProperty(e)&&Br.requests[e].abort()}const vH=(function(){const e=yL({xdomain:!1});return e&&e.responseType!==null})();class gH extends yH{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=vH&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Br(yL,this.uri(),t)}}function yL(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||pH))return new XMLHttpRequest}catch{}if(!t)try{return new ir[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const vL=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class bH extends sS{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=vL?{}:hL(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{try{this.doWrite(r,o)}catch{}i&&yp(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=pL()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const uv=ir.WebSocket||ir.MozWebSocket;class xH extends bH{createSocket(t,n,r){return vL?new uv(t,n,r):n?new uv(t,n):new uv(t)}doWrite(t,n){this.ws.send(n)}}class wH extends sS{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=nH(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=tH();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const o=()=>{r.read().then(({done:l,value:c})=>{l||(this.onPacket(c),o())}).catch(l=>{})};o();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this._writer.write(s).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n{i&&yp(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const SH={websocket:xH,webtransport:wH,polling:gH},_H=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,AH=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Yx(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=_H.exec(e||""),o={},s=14;for(;s--;)o[AH[s]]=i[s]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=OH(o,o.path),o.queryKey=PH(o,o.query),o}function OH(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function PH(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}const Zx=typeof addEventListener=="function"&&typeof removeEventListener=="function",Wd=[];Zx&&addEventListener("offline",()=>{Wd.forEach(e=>e())},!1);class lo extends Rt{constructor(t,n){if(super(),this.binaryType=iH,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=Yx(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=Yx(n.host).host);vp(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=fH(this.opts.query)),Zx&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Wd.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=dL,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&lo.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",lo.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,yp(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(lo.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Zx&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Wd.indexOf(this._offlineEventListener);r!==-1&&Wd.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}lo.protocol=dL;class EH extends lo{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",p=>{if(!r)if(p.type==="pong"&&p.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;lo.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const y=new Error("probe error");y.transport=n.name,this.emitReserved("upgradeError",y)}}))};function o(){r||(r=!0,h(),n.close(),n=null)}const s=p=>{const y=new Error("probe error: "+p);y.transport=n.name,o(),this.emitReserved("upgradeError",y)};function l(){s("transport closed")}function c(){s("socket closed")}function f(p){n&&p.name!==n.name&&o()}const h=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",l),this.off("close",c),this.off("upgrading",f)};n.once("open",i),n.once("error",s),n.once("close",l),this.once("close",c),this.once("upgrading",f),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;rSH[o]).filter(o=>!!o)),super(r?i:t,i)}};function CH(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=Yx(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+t,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r}const kH=typeof ArrayBuffer=="function",RH=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,gL=Object.prototype.toString,jH=typeof Blob=="function"||typeof Blob<"u"&&gL.call(Blob)==="[object BlobConstructor]",MH=typeof File=="function"||typeof File<"u"&&gL.call(File)==="[object FileConstructor]";function lS(e){return kH&&(e instanceof ArrayBuffer||RH(e))||jH&&e instanceof Blob||MH&&e instanceof File}function Hd(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.numthis.opts.maxAttachments)throw new Error("too many attachments");r.attachments=l}if(t.charAt(n+1)==="/"){const o=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(o,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const o=n+1;for(;++n;){const s=t.charAt(n);if(s==null||Number(s)!=s){--n;break}if(n===t.length)break}r.id=Number(t.substring(o,n+1))}if(t.charAt(++n)){const o=this.tryParse(t.substr(n));if(uS.isPayloadValid(r.type,o))r.data=o;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case Ve.CONNECT:return nT(n);case Ve.DISCONNECT:return n===void 0;case Ve.CONNECT_ERROR:return typeof n=="string"||nT(n);case Ve.EVENT:case Ve.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&DH.indexOf(n[0])===-1);case Ve.ACK:case Ve.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class $H{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=IH(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const BH=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function nT(e){return Object.prototype.toString.call(e)==="[object Object]"}const FH=Object.freeze(Object.defineProperty({__proto__:null,Decoder:uS,Encoder:LH,get PacketType(){return Ve}},Symbol.toStringTag,{value:"Module"}));function wr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const UH=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class bL extends Rt{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[wr(t,"open",this.onopen.bind(this)),wr(t,"packet",this.onpacket.bind(this)),wr(t,"error",this.onerror.bind(this)),wr(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,i,o;if(UH.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const s={type:Ve.EVENT,data:n};if(s.options={},s.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const h=this.ids++,p=n.pop();this._registerAckCallback(h,p),s.id=h}const l=(i=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||i===void 0?void 0:i.writable,c=this.connected&&!(!((o=this.io.engine)===null||o===void 0)&&o._hasPingExpired());return this.flags.volatile&&!l||(c?(this.notifyOutgoingListeners(s),this.packet(s)):this.sendBuffer.push(s)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let l=0;l{this.io.clearTimeoutFn(o),n.apply(this,l)};s.withError=!0,this.acks[t]=s}emitWithAck(t,...n){return new Promise((r,i)=>{const o=(s,l)=>s?i(s):r(l);o.withError=!0,n.push(o),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...o)=>(this._queue[0],i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Ve.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Ve.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ve.EVENT:case Ve.BINARY_EVENT:this.onevent(t);break;case Ve.ACK:case Ve.BINARY_ACK:this.onack(t);break;case Ve.DISCONNECT:this.ondisconnect();break;case Ve.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:Ve.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ve.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}ol.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};ol.prototype.reset=function(){this.attempts=0};ol.prototype.setMin=function(e){this.ms=e};ol.prototype.setMax=function(e){this.max=e};ol.prototype.setJitter=function(e){this.jitter=e};class tw extends Rt{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,vp(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new ol({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||FH;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new TH(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=wr(n,"open",function(){r.onopen(),t&&t()}),o=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},s=wr(n,"error",o);if(this._timeout!==!1){const l=this._timeout,c=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},l);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(i),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(wr(t,"ping",this.onping.bind(this)),wr(t,"data",this.ondata.bind(this)),wr(t,"error",this.onerror.bind(this)),wr(t,"close",this.onclose.bind(this)),wr(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){yp(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new bL(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const su={};function Kd(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=CH(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=su[i]&&o in su[i].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||s;let c;return l?c=new tw(r,t):(su[i]||(su[i]=new tw(r,t)),c=su[i]),n.query&&!t.query&&(t.query=n.queryKey),c.socket(n.path,t)}Object.assign(Kd,{Manager:tw,Socket:bL,io:Kd,connect:Kd});const qH=250;function rT(e,t){var n;const r=(n=e.token)!==null&&n!==void 0?n:la(),i={app_id:e.appId,token:r};r||(i.anonymous_id=iS());const o=Kd(e.serverUrl,{path:e.mountPath,transports:e.transports,query:i});return o.on("connect",async()=>{var s;return console.log("connect",o.id),(s=t.connect)===null||s===void 0?void 0:s.call(t)}),o.on("update_model",async s=>{var l;return(l=t.update_model)===null||l===void 0?void 0:l.call(t,s)}),o.on("error",async s=>{var l;return(l=t.error)===null||l===void 0?void 0:l.call(t,s)}),o.on("connect_error",async s=>{var l;return console.error("connect_error",s),(l=t.error)===null||l===void 0?void 0:l.call(t,s)}),o}function zH({config:e}){let t={...e};const n={},r={},i={connect:async()=>{const w=[];Object.keys(n).forEach(A=>{const O=y(A);O.length!==0&&(f(A),O.forEach(({connect:T})=>{const P=async()=>T==null?void 0:T();w.push(P())}))}),await Promise.all(w)},update_model:async w=>{const O=y(w.room).map(T=>{var P;return(P=T.update_model)===null||P===void 0?void 0:P.call(T,w)});await Promise.all(O)},error:async w=>{console.error("error",w);const A=Object.values(n).flat().map(O=>{var T;return(T=O.error)===null||T===void 0?void 0:T.call(O,w)});await Promise.all(A)}};let o=rT(e,i);function s(){l()}function l(){S(),o&&o.disconnect()}function c(w){s(),t={...t,...w},o=rT(t,i)}function f(w){o.emit("join",w)}function h(w){o.emit("leave",w)}async function p(w,A){var O;const T=JSON.stringify(A);return(O=i.update_model)===null||O===void 0?void 0:O.call(i,{room:w,data:T})}function y(w){var A;return(A=n[w])!==null&&A!==void 0?A:[]}function g(w){const A=r[w];A&&(clearTimeout(A),delete r[w])}function S(){Object.keys(r).forEach(w=>{var A,O;clearTimeout(r[w]),delete r[w],((O=(A=n[w])===null||A===void 0?void 0:A.length)!==null&&O!==void 0?O:0)===0&&delete n[w]})}function b(w){g(w),r[w]=setTimeout(()=>{var A,O;delete r[w],!(((O=(A=n[w])===null||A===void 0?void 0:A.length)!==null&&O!==void 0?O:0)>0)&&(h(w),delete n[w])},qH)}return{socket:o,subscribeToRoom:(w,A)=>{n[w]?g(w):(f(w),n[w]=[]),n[w].push(A);let O=!1;return()=>{var T,P;O||(O=!0,n[w]=(P=(T=n[w])===null||T===void 0?void 0:T.filter(C=>C!==A))!==null&&P!==void 0?P:[],n[w].length===0&&b(w))}},updateConfig:c,updateModel:p,disconnect:l}}(!globalThis.EventTarget||!globalThis.Event)&&console.error(` PartySocket requires a global 'EventTarget' class to be available! You can polyfill this global by adding this to your code before any partysocket imports: \`\`\` import 'partysocket/event-target-polyfill'; \`\`\` Please file an issue at https://github.com/partykit/partykit if you're still having trouble. `);var xL=class extends Event{constructor(t,n){super("error",n);Ye(this,"message");Ye(this,"error");this.message=t.message,this.error=t}},wL=class extends Event{constructor(t=1e3,n="",r){super("close",r);Ye(this,"code");Ye(this,"reason");Ye(this,"wasClean",!0);this.code=t,this.reason=n}},cv={Event,ErrorEvent:xL,CloseEvent:wL};function VH(e,t){if(!e)throw new Error(t)}function WH(e){return new e.constructor(e.type,e)}function HH(e){return"data"in e?new MessageEvent(e.type,e):"code"in e||"reason"in e?new wL(e.code||1999,e.reason||"unknown reason",e):"error"in e?new xL(e.error,e):new Event(e.type,e)}var yI,KH=typeof process<"u"&&typeof((yI=process.versions)==null?void 0:yI.node)<"u"&&typeof document>"u",wd=KH?HH:WH,Do={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},iT=!1,GH=class Bo extends EventTarget{constructor(n,r,i={}){super();Ye(this,"_ws");Ye(this,"_retryCount",-1);Ye(this,"_uptimeTimeout");Ye(this,"_connectTimeout");Ye(this,"_shouldReconnect",!0);Ye(this,"_connectLock",!1);Ye(this,"_binaryType","blob");Ye(this,"_closeCalled",!1);Ye(this,"_messageQueue",[]);Ye(this,"_url");Ye(this,"_protocols");Ye(this,"_options");Ye(this,"onclose",null);Ye(this,"onerror",null);Ye(this,"onmessage",null);Ye(this,"onopen",null);Ye(this,"_handleOpen",n=>{this._debug("open event");const{minUptime:r=Do.minUptime}=this._options;clearTimeout(this._connectTimeout),this._uptimeTimeout=setTimeout(()=>this._acceptOpen(),r),VH(this._ws,"WebSocket is not defined"),this._ws.binaryType=this._binaryType,this._messageQueue.forEach(i=>{var o;return(o=this._ws)==null?void 0:o.send(i)}),this._messageQueue=[],this.onopen&&this.onopen(n),this.dispatchEvent(wd(n))});Ye(this,"_handleMessage",n=>{this._debug("message event"),this.onmessage&&this.onmessage(n),this.dispatchEvent(wd(n))});Ye(this,"_handleError",n=>{this._debug("error event",n.message),this._disconnect(void 0,n.message==="TIMEOUT"?"timeout":void 0),this.onerror&&this.onerror(n),this._debug("exec error listeners"),this.dispatchEvent(wd(n)),this._connect()});Ye(this,"_handleClose",n=>{this._debug("close event"),this._clearTimeouts(),this._shouldReconnect&&this._connect(),this.onclose&&this.onclose(n),this.dispatchEvent(wd(n))});this._url=n,this._protocols=r,this._options=i,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}get CONNECTING(){return Bo.CONNECTING}get OPEN(){return Bo.OPEN}get CLOSING(){return Bo.CLOSING}get CLOSED(){return Bo.CLOSED}get binaryType(){return this._ws?this._ws.binaryType:this._binaryType}set binaryType(n){this._binaryType=n,this._ws&&(this._ws.binaryType=n)}get retryCount(){return Math.max(this._retryCount,0)}get bufferedAmount(){return this._messageQueue.reduce((r,i)=>(typeof i=="string"?r+=i.length:i instanceof Blob?r+=i.size:r+=i.byteLength,r),0)+(this._ws?this._ws.bufferedAmount:0)}get extensions(){return this._ws?this._ws.extensions:""}get protocol(){return this._ws?this._ws.protocol:""}get readyState(){return this._ws?this._ws.readyState:this._options.startClosed?Bo.CLOSED:Bo.CONNECTING}get url(){return this._ws?this._ws.url:""}get shouldReconnect(){return this._shouldReconnect}close(n=1e3,r){if(this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(n,r)}reconnect(n,r){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(n,r),this._connect())}send(n){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",n),this._ws.send(n);else{const{maxEnqueuedMessages:r=Do.maxEnqueuedMessages}=this._options;this._messageQueue.length",...n])}_getNextDelay(){const{reconnectionDelayGrowFactor:n=Do.reconnectionDelayGrowFactor,minReconnectionDelay:r=Do.minReconnectionDelay,maxReconnectionDelay:i=Do.maxReconnectionDelay}=this._options;let o=0;return this._retryCount>0&&(o=r*Math.pow(n,this._retryCount-1),o>i&&(o=i)),this._debug("next delay",o),o}_wait(){return new Promise(n=>{setTimeout(n,this._getNextDelay())})}_getNextProtocols(n){if(!n)return Promise.resolve(null);if(typeof n=="string"||Array.isArray(n))return Promise.resolve(n);if(typeof n=="function"){const r=n();if(!r)return Promise.resolve(null);if(typeof r=="string"||Array.isArray(r))return Promise.resolve(r);if(r.then)return r}throw Error("Invalid protocols")}_getNextUrl(n){if(typeof n=="string")return Promise.resolve(n);if(typeof n=="function"){const r=n();if(typeof r=="string")return Promise.resolve(r);if(r.then)return r}throw Error("Invalid URL")}_connect(){if(this._connectLock||!this._shouldReconnect)return;this._connectLock=!0;const{maxRetries:n=Do.maxRetries,connectionTimeout:r=Do.connectionTimeout}=this._options;if(this._retryCount>=n){this._debug("max retries reached",this._retryCount,">=",n);return}this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),this._wait().then(()=>Promise.all([this._getNextUrl(this._url),this._getNextProtocols(this._protocols||null)])).then(([i,o])=>{if(this._closeCalled){this._connectLock=!1;return}!this._options.WebSocket&&typeof WebSocket>"u"&&!iT&&(console.error(`‼️ No WebSocket implementation available. You should define options.WebSocket. For example, if you're using node.js, run \`npm install ws\`, and then in your code: import PartySocket from 'partysocket'; import WS from 'ws'; const partysocket = new PartySocket({ host: "127.0.0.1:1999", room: "test-room", WebSocket: WS }); `),iT=!0);const s=this._options.WebSocket||WebSocket;this._debug("connect",{url:i,protocols:o}),this._ws=o?new s(i,o):new s(i),this._ws.binaryType=this._binaryType,this._connectLock=!1,this._addListeners(),this._connectTimeout=setTimeout(()=>this._handleTimeout(),r)}).catch(i=>{this._connectLock=!1,this._handleError(new cv.ErrorEvent(Error(i.message),this))})}_handleTimeout(){this._debug("timeout event"),this._handleError(new cv.ErrorEvent(Error("TIMEOUT"),this))}_disconnect(n=1e3,r){if(this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(n,r),this._handleClose(new cv.CloseEvent(n,r,this))}catch{}}}_acceptOpen(){this._debug("accept open"),this._retryCount=0}_removeListeners(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))}_addListeners(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))}_clearTimeouts(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}};/*! * Reconnecting WebSocket * by Pedro Ladaria * https://github.com/pladaria/reconnecting-websocket * License MIT */var QH=e=>e[1]!==null&&e[1]!==void 0;function XH(){if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();let e=new Date().getTime(),t=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){let r=Math.random()*16;return e>0?(r=(e+r)%16|0,e=Math.floor(e/16)):(r=(t+r)%16|0,t=Math.floor(t/16)),(n==="x"?r:r&3|8).toString(16)})}function SL(e,t,n={}){const{host:r,path:i,protocol:o,room:s,party:l,query:c}=e;let f=r.replace(/^(http|https|ws|wss):\/\//,"");if(f.endsWith("/")&&(f=f.slice(0,-1)),i&&i.startsWith("/"))throw new Error("path must not start with a slash");const h=l??"main",p=i?`/${i}`:"",y=o||(f.startsWith("localhost:")||f.startsWith("127.0.0.1:")||f.startsWith("192.168.")||f.startsWith("10.")||f.startsWith("172.")&&f.split(".")[1]>="16"&&f.split(".")[1]<="31"||f.startsWith("[::ffff:7f00:1]:")?t:t+"s"),g=`${y}://${f}/${l?`parties/${l}`:"party"}/${s}${p}`,S=(v={})=>`${g}?${new URLSearchParams([...Object.entries(n),...Object.entries(v).filter(QH)])}`,b=typeof c=="function"?async()=>S(await c()):S(c);return{host:f,path:p,room:s,name:h,protocol:y,partyUrl:g,urlProvider:b}}var YH=class extends GH{constructor(t){const n=oT(t);super(n.urlProvider,n.protocols,n.socketOptions);Ye(this,"_pk");Ye(this,"_pkurl");Ye(this,"name");Ye(this,"room");Ye(this,"host");Ye(this,"path");this.partySocketOptions=t,this.setWSProperties(n)}updateProperties(t){const n=oT({...t,host:t.host??this.host,room:t.room??this.room,path:t.path??this.path});this._url=n.urlProvider,this._protocols=n.protocols,this._options=n.socketOptions,this.setWSProperties(n)}setWSProperties(t){const{_pk:n,_pkurl:r,name:i,room:o,host:s,path:l}=t;this._pk=n,this._pkurl=r,this.name=i,this.room=o,this.host=s,this.path=l}reconnect(t,n){if(!this.room||!this.host)throw new Error("The room and host must be set before connecting, use `updateProperties` method to set them or pass them to the constructor.");super.reconnect(t,n)}get id(){return this._pk}get roomUrl(){return this._pkurl}static async fetch(t,n){const r=SL(t,"http"),i=typeof r.urlProvider=="string"?r.urlProvider:await r.urlProvider();return(t.fetch??fetch)(i,n)}};function oT(e){const{id:t,host:n,path:r,party:i,room:o,protocol:s,query:l,protocols:c,...f}=e,h=t||XH(),p=SL(e,"ws",{_pk:h});return{_pk:h,_pkurl:p.partyUrl,name:p.name,room:p.room,host:p.host,path:p.path,protocols:c,socketOptions:f,urlProvider:p.urlProvider}}const ZH=1e3,JH=3e3;class eK{constructor(t,n,r,i,o){var s;this.onClose=o,this.listeners=new Set,this.heartbeat=null,this.id=(s=i==null?void 0:i.id)!==null&&s!==void 0?s:crypto.randomUUID();const l=new YH({host:r.host,party:t,room:n,id:this.id,query:()=>{const h=r.getAuthToken();return{app_id:r.appId,handler:t,...h?{token:h}:{},...r.functionsVersion?{fv:r.functionsVersion}:{}}}});this.ws=l;let c=Date.now();const f=()=>{c=Date.now()};l.addEventListener("open",f),l.addEventListener("message",h=>{f();let p;try{p=JSON.parse(h.data)}catch{return}if((p&&typeof p=="object"?p.type:void 0)!=="__pong")for(const g of this.listeners)g(p)}),this.heartbeat=setInterval(()=>{if(Date.now()-c>JH){f(),l.reconnect();return}try{l.send(JSON.stringify({type:"__ping"}))}catch{}},ZH)}subscribe(t){return this.listeners.add(t),{unsubscribe:()=>{this.listeners.delete(t)}}}send(t){this.ws.send(JSON.stringify(t))}close(){this.heartbeat&&(clearInterval(this.heartbeat),this.heartbeat=null),this.listeners.clear(),this.ws.close(),this.onClose()}}function tK(e,t,n,r){let i=null;return{connect(o){if(i)return i;const s=new eK(e,t,n,o,()=>{r.delete(s),i===s&&(i=null)});return i=s,r.add(s),s}}}function nK(e,t){return e&&!e.startsWith("/")?e:t??e}function rK(e){const t=new Set;return{module:new Proxy({},{get(r,i){if(!(typeof i!="string"||i==="then"))return o=>tK(i,o,e,t)}}),closeAll:()=>{for(const r of[...t])r.close()}}}function iK(e){var t,n,r;const{serverUrl:i="https://base44.app",appId:o,token:s,serviceToken:l,requiresAuth:c=!1,appBaseUrl:f,options:h,functionsVersion:p,headers:y}=e,g=typeof f=="string"?f:"",S={serverUrl:i,mountPath:"/ws-user-apps/socket.io/",transports:["websocket"],appId:o,token:s};let b=null;const v=()=>(b||(b=zH({config:S})),b),w={...y,"X-App-Id":String(o)},A=p?{...w,"Base44-Functions-Version":p}:w,O=bu({baseURL:`${i}/api`,headers:w,token:s,onError:h==null?void 0:h.onError}),T=bu({baseURL:`${i}/api`,headers:A,token:s,interceptResponses:!1,onError:h==null?void 0:h.onError}),P={...w,...s?{"on-behalf-of":`Bearer ${s}`}:{}},C=bu({baseURL:`${i}/api`,headers:P,token:l,onError:h==null?void 0:h.onError}),k=bu({baseURL:`${i}/api`,headers:A,token:l,interceptResponses:!1}),j=zW(O,T,o,{appBaseUrl:g});if(typeof window<"u"){const G=s||la();G&&j.setToken(G)}const N=rK({appId:o,host:nK(i,typeof window<"u"?(t=window.location)===null||t===void 0?void 0:t.origin:void 0),functionsVersion:p,getAuthToken:()=>s||la()}),U={entities:HE({axios:O,appId:o,getSocket:v}),integrations:KE(O,o),connectors:HW(O,o),auth:j,functions:GE(T,o,{getAuthHeaders:()=>{const G={},F=s||la();return F&&(G.Authorization=`Bearer ${F}`),G},baseURL:(n=T.defaults)===null||n===void 0?void 0:n.baseURL}),agents:QE({axios:O,getSocket:v,appId:o,serverUrl:i,token:s}),aiGateway:XE({serverUrl:i,token:s,appId:o}),appLogs:YE(O,o),users:GW(O,o),analytics:CW({axiosClient:O,serverUrl:i,appId:o,userAuthModule:j}),actors:N.module,cleanup:()=>{U.analytics.cleanup(),N.closeAll(),b&&b.disconnect()}},L={entities:HE({axios:C,appId:o,getSocket:v}),integrations:KE(C,o),sso:VW(C,o),connectors:WW(C,o),functions:GE(k,o,{getAuthHeaders:()=>{const G={};return l&&(G.Authorization=`Bearer ${l}`),G},baseURL:(r=k.defaults)===null||r===void 0?void 0:r.baseURL}),agents:QE({axios:C,getSocket:v,appId:o,serverUrl:i,token:s}),aiGateway:XE({serverUrl:i,token:l,appId:o}),appLogs:YE(C,o),cleanup:()=>{b&&b.disconnect()}};return c&&typeof window<"u"&&setTimeout(async()=>{try{await U.auth.isAuthenticated()||U.auth.redirectToLogin(window.location.href)}catch(G){console.error("Authentication check failed:",G),U.auth.redirectToLogin(window.location.href)}},0),{...U,setToken(G){U.auth.setToken(G),b&&b.updateConfig({token:G}),S.token=G},getConfig(){return{serverUrl:i,appId:o,requiresAuth:c}},get asServiceRole(){if(!l)throw new Error("Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.");return L}}}const _L=typeof window>"u",oK=_L?{localStorage:new Map}:window,ku=oK.localStorage,aK=e=>e.replace(/([A-Z])/g,"_$1").toLowerCase(),es=(e,{defaultValue:t=void 0,removeFromUrl:n=!1}={})=>{if(_L)return t;const r=`base44_${aK(e)}`,i=new URLSearchParams(window.location.search),o=i.get(e);if(n){i.delete(e);const l=`${window.location.pathname}${i.toString()?`?${i.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,l)}if(o)return ku.setItem(r,o),o;if(t)return ku.setItem(r,t),t;const s=ku.getItem(r);return s||null},sK=()=>(es("clear_access_token")==="true"&&(ku.removeItem("base44_access_token"),ku.removeItem("token")),{appId:es("app_id",{defaultValue:"6a7a7bb337b3bcbc6dafc972"}),token:es("access_token",{removeFromUrl:!0}),fromUrl:es("from_url",{defaultValue:window.location.href}),functionsVersion:es("functions_version",{defaultValue:"prod"}),appBaseUrl:es("app_base_url",{defaultValue:void 0})}),wu={...sK()},{appId:lK,token:uK,functionsVersion:cK,appBaseUrl:fK}=wu,Su=iK({appId:lK,token:uK,functionsVersion:cK,serverUrl:"",requiresAuth:!1,appBaseUrl:fK});function dK({}){var i;const t=X1().pathname.substring(1),{data:n,isFetched:r}=EV({queryKey:["user"],queryFn:async()=>{try{return{user:await Su.auth.me(),isAuthenticated:!0}}catch{return{user:null,isAuthenticated:!1}}}});return E.jsx("div",{className:"min-h-screen flex items-center justify-center p-6 bg-slate-50",children:E.jsx("div",{className:"max-w-md w-full",children:E.jsxs("div",{className:"text-center space-y-6",children:[E.jsxs("div",{className:"space-y-2",children:[E.jsx("h1",{className:"text-7xl font-light text-slate-300",children:"404"}),E.jsx("div",{className:"h-0.5 w-16 bg-slate-200 mx-auto"})]}),E.jsxs("div",{className:"space-y-3",children:[E.jsx("h2",{className:"text-2xl font-medium text-slate-800",children:"Page Not Found"}),E.jsxs("p",{className:"text-slate-600 leading-relaxed",children:["The page ",E.jsxs("span",{className:"font-medium text-slate-700",children:['"',t,'"']})," could not be found in this application."]})]}),r&&n.isAuthenticated&&((i=n.user)==null?void 0:i.role)==="admin"&&E.jsx("div",{className:"mt-8 p-4 bg-slate-100 rounded-lg border border-slate-200",children:E.jsxs("div",{className:"flex items-start space-x-3",children:[E.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-orange-100 flex items-center justify-center mt-0.5",children:E.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-400"})}),E.jsxs("div",{className:"text-left space-y-1",children:[E.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Admin Note"}),E.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:"This could mean that the AI hasn't implemented this page yet. Ask it to implement it in the chat."})]})]})}),E.jsx("div",{className:"pt-6",children:E.jsxs("button",{onClick:()=>window.location.href="/",className:"inline-flex items-center px-4 py-2 text-sm font-medium text-slate-700 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 hover:border-slate-300 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500",children:[E.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Go Home"]})})]})})})}const AL=M.createContext(),hK=({children:e})=>{const[t,n]=M.useState(null),[r,i]=M.useState(!1),[o,s]=M.useState(!0),[l,c]=M.useState(!0),[f,h]=M.useState(null),[p,y]=M.useState(!1),[g,S]=M.useState(null);M.useEffect(()=>{b()},[]);const b=async()=>{var O,T;try{c(!0),h(null);const P=bu({baseURL:"/api/apps/public",headers:{"X-App-Id":wu.appId},token:wu.token,interceptResponses:!0});try{const C=await P.get(`/prod/public-settings/by-id/${wu.appId}`);S(C),wu.token?await v():(s(!1),i(!1),y(!0)),c(!1)}catch(C){if(console.error("App state check failed:",C),C.status===403&&((T=(O=C.data)==null?void 0:O.extra_data)!=null&&T.reason)){const k=C.data.extra_data.reason;h(k==="auth_required"?{type:"auth_required",message:"Authentication required"}:k==="user_not_registered"?{type:"user_not_registered",message:"User not registered for this app"}:{type:k,message:C.message})}else h({type:"unknown",message:C.message||"Failed to load app"});c(!1),s(!1)}}catch(P){console.error("Unexpected error:",P),h({type:"unknown",message:P.message||"An unexpected error occurred"}),c(!1),s(!1)}},v=async()=>{try{s(!0);const O=await Su.auth.me();n(O),i(!0),s(!1),y(!0)}catch(O){console.error("User auth check failed:",O),s(!1),i(!1),y(!0),(O.status===401||O.status===403)&&h({type:"auth_required",message:"Authentication required"})}},w=(O=!0)=>{n(null),i(!1),O?Su.auth.logout(window.location.href):Su.auth.logout()},A=()=>{Su.auth.redirectToLogin(window.location.href)};return E.jsx(AL.Provider,{value:{user:t,isAuthenticated:r,isLoadingAuth:o,isLoadingPublicSettings:l,authError:f,appPublicSettings:g,authChecked:p,logout:w,navigateToLogin:A,checkUserAuth:v,checkAppState:b},children:e})},pK=()=>{const e=M.useContext(AL);if(!e)throw new Error("useAuth must be used within an AuthProvider");return e},mK=()=>E.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-white to-slate-50",children:E.jsx("div",{className:"max-w-md w-full p-8 bg-white rounded-lg shadow-lg border border-slate-100",children:E.jsxs("div",{className:"text-center",children:[E.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 rounded-full bg-orange-100",children:E.jsx("svg",{className:"w-8 h-8 text-orange-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),E.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:"Access Restricted"}),E.jsx("p",{className:"text-slate-600 mb-8",children:"You are not registered to use this application. Please contact the app administrator to request access."}),E.jsxs("div",{className:"p-4 bg-slate-50 rounded-md text-sm text-slate-600",children:[E.jsx("p",{children:"If you believe this is an error, you can:"}),E.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[E.jsx("li",{children:"Verify you are logged in with the correct account"}),E.jsx("li",{children:"Contact the app administrator for access"}),E.jsx("li",{children:"Try logging out and back in again"})]})]})]})})}),yK=e=>{const t=e.slice(1);try{return decodeURIComponent(t)}catch{return t}};function vK(){const{pathname:e,hash:t}=X1(),n=JV();return M.useEffect(()=>{if(n!=="POP"){if(t){const r=yK(t),i=window.setTimeout(()=>{var o;(o=document.getElementById(r))==null||o.scrollIntoView({behavior:"smooth"})},50);return()=>window.clearTimeout(i)}window.scrollTo({top:0,left:0,behavior:"instant"})}},[e,t,n]),null}const aT=["About Us","Our Business","Investor Relations","Sustainability","Media Centre","Careers"],gK=["Real Estate","Logistics & Industrial","Asset Management","Project Management"],bK=["Alrazah Properties","Alrazah Industrial","Alrazah Capital","Alrazah PMO"];function xK(){const[e,t]=M.useState(!1),[n,r]=M.useState(!0),[i,o]=M.useState(!1),[s,l]=M.useState(!1);return M.useEffect(()=>{const c=()=>{const f=window.scrollY;t(f>100),r(f<40)};return window.addEventListener("scroll",c,{passive:!0}),()=>window.removeEventListener("scroll",c)},[]),E.jsxs("div",{className:"fixed top-0 left-0 right-0 z-[1000]",children:[E.jsxs("div",{className:"h-10 bg-navy border-b border-gold/20 flex items-center justify-between px-5 md:px-20 transition-transform duration-300",style:{transform:n?"translateY(0)":"translateY(-40px)"},children:[E.jsx("span",{className:"text-[13px] text-warmwhite/80 tracking-wide hidden md:block",children:"Alrazah Holding (Q.S.C.) is listed on the Qatar Stock Exchange (Ticker: ALRAZAH)"}),E.jsxs("div",{className:"flex items-center gap-5 ml-auto",children:[E.jsxs("span",{className:"text-[12px] font-mono text-gold",children:["QAR 48.20 ",E.jsx("span",{className:"text-gold/70",children:"▲ +0.42%"})]}),E.jsx("span",{className:"text-[13px] text-warmwhite/90 tracking-wide",children:"EN / عربي"})]})]}),E.jsxs("header",{className:`transition-all duration-300 ${e?"bg-charcoal/90 backdrop-blur-md shadow-[0_2px_16px_rgba(10,22,40,0.12)]":"bg-transparent"}`,onMouseLeave:()=>o(!1),children:[E.jsxs("div",{className:"max-w-[1440px] mx-auto px-5 md:px-20 h-16 md:h-20 flex items-center justify-between",children:[E.jsxs("a",{href:"#top",className:"flex items-center gap-2 group",children:[E.jsx("span",{className:"font-display text-warmwhite text-2xl tracking-tight leading-none",children:"ALRAZAH"}),E.jsx("span",{className:"text-gold text-[10px] font-mono tracking-[0.3em] mt-1",children:"HOLDING"})]}),E.jsx("nav",{className:"hidden lg:flex items-center gap-8",children:aT.map(c=>E.jsxs("div",{onMouseEnter:()=>o(c==="Our Business"),className:"relative py-2",children:[E.jsxs("button",{className:`text-sm font-medium tracking-[0.04em] flex items-center gap-1 transition-colors ${c==="Our Business"?"text-gold":"text-warmwhite hover:text-gold"}`,children:[c,c==="Our Business"&&E.jsx(E5,{className:"w-3.5 h-3.5"})]}),c==="Our Business"&&E.jsx("span",{className:"absolute left-0 right-0 -bottom-0.5 h-0.5 bg-gold scale-x-100 origin-left"})]},c))}),E.jsxs("div",{className:"flex items-center gap-4",children:[E.jsx("button",{className:"hidden md:inline-flex items-center px-6 py-3 border border-gold text-gold text-sm font-semibold tracking-[0.06em] rounded-sm hover:bg-gold hover:text-navy transition-all duration-200",children:"Investor Login"}),E.jsx("button",{className:"lg:hidden text-gold",onClick:()=>l(!s),"aria-label":"Menu",children:s?E.jsx(QI,{className:"w-6 h-6"}):E.jsx(F5,{className:"w-6 h-6"})})]})]}),i&&E.jsx("div",{className:"hidden lg:block absolute left-0 right-0 top-full bg-charcoal/95 backdrop-blur-xl border-t-2 border-gold animate-in",children:E.jsxs("div",{className:"max-w-[1440px] mx-auto px-20 py-12 grid grid-cols-3 gap-12",children:[E.jsxs("div",{children:[E.jsx("p",{className:"text-[11px] font-semibold tracking-[0.1em] text-gold uppercase mb-6",children:"Sectors"}),E.jsx("ul",{className:"space-y-4",children:gK.map(c=>E.jsx("li",{children:E.jsxs("a",{href:"#portfolio",className:`text-sm text-warmwhite hover:text-gold transition-colors block ${c==="Real Estate"?"text-gold border-l-2 border-gold pl-4":""}`,children:[c,c==="Real Estate"&&E.jsx("span",{className:"block text-[11px] text-gold/70 mt-0.5",children:"› Land Bank"})]})},c))})]}),E.jsxs("div",{children:[E.jsx("p",{className:"text-[11px] font-semibold tracking-[0.1em] text-gold uppercase mb-6",children:"Subsidiaries"}),E.jsx("ul",{className:"space-y-4",children:bK.map(c=>E.jsx("li",{children:E.jsx("a",{href:"#",className:"text-sm text-warmwhite hover:text-gold transition-colors",children:c})},c))})]}),E.jsxs("div",{children:[E.jsx("p",{className:"text-[11px] font-semibold tracking-[0.1em] text-gold uppercase mb-6",children:"Quick Links"}),E.jsxs("ul",{className:"space-y-4",children:[E.jsx("li",{children:E.jsx("a",{href:"#",className:"text-sm text-warmwhite hover:text-gold transition-colors",children:"Annual Report 2025"})}),E.jsx("li",{children:E.jsx("a",{href:"#",className:"text-sm text-warmwhite hover:text-gold transition-colors",children:"Investor Presentation"})}),E.jsx("li",{children:E.jsx("a",{href:"#",className:"text-sm text-warmwhite hover:text-gold transition-colors",children:"ESG Report"})}),E.jsx("li",{children:E.jsx("a",{href:"#",className:"text-sm text-warmwhite hover:text-gold transition-colors",children:"Corporate Governance"})})]})]})]})})]}),!e&&E.jsx("div",{className:"hidden md:block bg-transparent",children:E.jsx("div",{className:"max-w-[1440px] mx-auto px-20 pt-6",children:E.jsxs("nav",{className:"flex items-center gap-2 text-[13px] text-warmwhite/60",children:[E.jsx("a",{href:"#",className:"hover:text-gold transition-colors",children:"Home"}),E.jsx("span",{children:"/"}),E.jsx("a",{href:"#",className:"hover:text-gold transition-colors",children:"Our Business"}),E.jsx("span",{children:"/"}),E.jsx("a",{href:"#",className:"hover:text-gold transition-colors",children:"Real Estate"}),E.jsx("span",{children:"/"}),E.jsx("span",{className:"text-warmwhite font-medium",children:"Land Bank"})]})})}),s&&E.jsxs("div",{className:"lg:hidden fixed inset-0 top-16 bg-navy z-[999] overflow-y-auto px-6 py-8",children:[E.jsx("nav",{className:"flex flex-col gap-1",children:aT.map(c=>E.jsx("a",{href:"#",className:"text-warmwhite text-lg py-3 border-b border-pearl/10 hover:text-gold transition-colors",onClick:()=>l(!1),children:c},c))}),E.jsx("button",{className:"mt-6 w-full px-6 py-3 border border-gold text-gold text-sm font-semibold tracking-[0.06em] rounded-sm",children:"Investor Login"})]})]})}const OL=M.createContext({});function wK(e){const t=M.useRef(null);return t.current===null&&(t.current=e()),t.current}const cS=M.createContext(null),PL=M.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function SK(e=!0){const t=M.useContext(cS);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,o=M.useId();M.useEffect(()=>{e&&i(o)},[e]);const s=M.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,s]:[!0]}const fS=typeof window<"u",_K=fS?M.useLayoutEffect:M.useEffect,qn=e=>e;let EL=qn;function dS(e){let t;return()=>(t===void 0&&(t=e()),t)}const Rs=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},fi=e=>e*1e3,di=e=>e/1e3,AK={useManualTiming:!1};function OK(e){let t=new Set,n=new Set,r=!1,i=!1;const o=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function l(f){o.has(f)&&(c.schedule(f),e()),f(s)}const c={schedule:(f,h=!1,p=!1)=>{const g=p&&r?t:n;return h&&o.add(f),g.has(f)||g.add(f),f},cancel:f=>{n.delete(f),o.delete(f)},process:f=>{if(s=f,r){i=!0;return}r=!0,[t,n]=[n,t],t.forEach(l),t.clear(),r=!1,i&&(i=!1,c.process(f))}};return c}const Sd=["read","resolveKeyframes","update","preRender","render","postRender"],PK=40;function TL(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=Sd.reduce((w,A)=>(w[A]=OK(o),w),{}),{read:l,resolveKeyframes:c,update:f,preRender:h,render:p,postRender:y}=s,g=()=>{const w=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(w-i.timestamp,PK),1),i.timestamp=w,i.isProcessing=!0,l.process(i),c.process(i),f.process(i),h.process(i),p.process(i),y.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(g))},S=()=>{n=!0,r=!0,i.isProcessing||e(g)};return{schedule:Sd.reduce((w,A)=>{const O=s[A];return w[A]=(T,P=!1,C=!1)=>(n||S(),O.schedule(T,P,C)),w},{}),cancel:w=>{for(let A=0;AsT[e].some(n=>!!t[n])};function EK(e){for(const t in e)js[t]={...js[t],...e[t]}}const TK=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function ih(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||TK.has(e)}let kL=e=>!ih(e);function CK(e){e&&(kL=t=>t.startsWith("on")?!ih(t):e(t))}try{CK(require("@emotion/is-prop-valid").default)}catch{}function kK(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(kL(i)||n===!0&&ih(i)||!t&&!ih(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function RK(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}const gp=M.createContext({});function Vu(e){return typeof e=="string"||Array.isArray(e)}function bp(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const hS=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],pS=["initial",...hS];function xp(e){return bp(e.animate)||pS.some(t=>Vu(e[t]))}function RL(e){return!!(xp(e)||e.variants)}function jK(e,t){if(xp(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Vu(n)?n:void 0,animate:Vu(r)?r:void 0}}return e.inherit!==!1?t:{}}function MK(e){const{initial:t,animate:n}=jK(e,M.useContext(gp));return M.useMemo(()=>({initial:t,animate:n}),[lT(t),lT(n)])}function lT(e){return Array.isArray(e)?e.join(" "):e}const NK=Symbol.for("motionComponentSymbol");function is(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function IK(e,t,n){return M.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):is(n)&&(n.current=r))},[t])}const mS=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),DK="framerAppearId",jL="data-"+mS(DK),{schedule:yS}=TL(queueMicrotask,!1),ML=M.createContext({});function LK(e,t,n,r,i){var o,s;const{visualElement:l}=M.useContext(gp),c=M.useContext(CL),f=M.useContext(cS),h=M.useContext(PL).reducedMotion,p=M.useRef(null);r=r||c.renderer,!p.current&&r&&(p.current=r(e,{visualState:t,parent:l,props:n,presenceContext:f,blockInitialAnimation:f?f.initial===!1:!1,reducedMotionConfig:h}));const y=p.current,g=M.useContext(ML);y&&!y.projection&&i&&(y.type==="html"||y.type==="svg")&&$K(p.current,n,i,g);const S=M.useRef(!1);M.useInsertionEffect(()=>{y&&S.current&&y.update(n,f)});const b=n[jL],v=M.useRef(!!b&&!(!((o=window.MotionHandoffIsComplete)===null||o===void 0)&&o.call(window,b))&&((s=window.MotionHasOptimisedAnimation)===null||s===void 0?void 0:s.call(window,b)));return _K(()=>{y&&(S.current=!0,window.MotionIsMounted=!0,y.updateFeatures(),yS.render(y.render),v.current&&y.animationState&&y.animationState.animateChanges())}),M.useEffect(()=>{y&&(!v.current&&y.animationState&&y.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var w;(w=window.MotionHandoffMarkAsComplete)===null||w===void 0||w.call(window,b)}),v.current=!1))}),y}function $K(e,t,n,r){const{layoutId:i,layout:o,drag:s,dragConstraints:l,layoutScroll:c,layoutRoot:f}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:NL(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!s||l&&is(l),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,layoutScroll:c,layoutRoot:f})}function NL(e){if(e)return e.options.allowProjection!==!1?e.projection:NL(e.parent)}function BK({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){var o,s;e&&EK(e);function l(f,h){let p;const y={...M.useContext(PL),...f,layoutId:FK(f)},{isStatic:g}=y,S=MK(f),b=r(f,g);if(!g&&fS){UK();const v=qK(y);p=v.MeasureLayout,S.visualElement=LK(i,b,y,t,v.ProjectionNode)}return E.jsxs(gp.Provider,{value:S,children:[p&&S.visualElement?E.jsx(p,{visualElement:S.visualElement,...y}):null,n(i,f,IK(b,S.visualElement,h),b,g,S.visualElement)]})}l.displayName=`motion.${typeof i=="string"?i:`create(${(s=(o=i.displayName)!==null&&o!==void 0?o:i.name)!==null&&s!==void 0?s:""})`}`;const c=M.forwardRef(l);return c[NK]=i,c}function FK({layoutId:e}){const t=M.useContext(OL).id;return t&&e!==void 0?t+"-"+e:e}function UK(e,t){M.useContext(CL).strict}function qK(e){const{drag:t,layout:n}=js;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const zK=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function vS(e){return typeof e!="string"||e.includes("-")?!1:!!(zK.indexOf(e)>-1||/[A-Z]/u.test(e))}function uT(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function gS(e,t,n,r){if(typeof t=="function"){const[i,o]=uT(r);t=t(n!==void 0?n:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=uT(r);t=t(n!==void 0?n:e.custom,i,o)}return t}const nw=e=>Array.isArray(e),VK=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),WK=e=>nw(e)?e[e.length-1]||0:e,pn=e=>!!(e&&e.getVelocity);function Gd(e){const t=pn(e)?e.get():e;return VK(t)?t.toValue():t}function HK({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,o){const s={latestValues:KK(r,i,o,e),renderState:t()};return n&&(s.onMount=l=>n({props:r,current:l,...s}),s.onUpdate=l=>n(l)),s}const IL=e=>(t,n)=>{const r=M.useContext(gp),i=M.useContext(cS),o=()=>HK(e,t,r,i);return n?o():wK(o)};function KK(e,t,n,r){const i={},o=r(e,{});for(const y in o)i[y]=Gd(o[y]);let{initial:s,animate:l}=e;const c=xp(e),f=RL(e);t&&f&&!c&&e.inherit!==!1&&(s===void 0&&(s=t.initial),l===void 0&&(l=t.animate));let h=n?n.initial===!1:!1;h=h||s===!1;const p=h?l:s;if(p&&typeof p!="boolean"&&!bp(p)){const y=Array.isArray(p)?p:[p];for(let g=0;gt=>typeof t=="string"&&t.startsWith(e),LL=DL("--"),GK=DL("var(--"),bS=e=>GK(e)?QK.test(e.split("/*")[0].trim()):!1,QK=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,$L=(e,t)=>t&&typeof e=="number"?t.transform(e):e,yi=(e,t,n)=>n>t?t:ntypeof e=="number",parse:parseFloat,transform:e=>e},Wu={...sl,transform:e=>yi(0,1,e)},_d={...sl,default:1},zc=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Hi=zc("deg"),Fr=zc("%"),Ne=zc("px"),XK=zc("vh"),YK=zc("vw"),cT={...Fr,parse:e=>Fr.parse(e)/100,transform:e=>Fr.transform(e*100)},ZK={borderWidth:Ne,borderTopWidth:Ne,borderRightWidth:Ne,borderBottomWidth:Ne,borderLeftWidth:Ne,borderRadius:Ne,radius:Ne,borderTopLeftRadius:Ne,borderTopRightRadius:Ne,borderBottomRightRadius:Ne,borderBottomLeftRadius:Ne,width:Ne,maxWidth:Ne,height:Ne,maxHeight:Ne,top:Ne,right:Ne,bottom:Ne,left:Ne,padding:Ne,paddingTop:Ne,paddingRight:Ne,paddingBottom:Ne,paddingLeft:Ne,margin:Ne,marginTop:Ne,marginRight:Ne,marginBottom:Ne,marginLeft:Ne,backgroundPositionX:Ne,backgroundPositionY:Ne},JK={rotate:Hi,rotateX:Hi,rotateY:Hi,rotateZ:Hi,scale:_d,scaleX:_d,scaleY:_d,scaleZ:_d,skew:Hi,skewX:Hi,skewY:Hi,distance:Ne,translateX:Ne,translateY:Ne,translateZ:Ne,x:Ne,y:Ne,z:Ne,perspective:Ne,transformPerspective:Ne,opacity:Wu,originX:cT,originY:cT,originZ:Ne},fT={...sl,transform:Math.round},xS={...ZK,...JK,zIndex:fT,size:Ne,fillOpacity:Wu,strokeOpacity:Wu,numOctaves:fT},e9={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},t9=al.length;function n9(e,t,n){let r="",i=!0;for(let o=0;o({style:{},transform:{},transformOrigin:{},vars:{}}),BL=()=>({..._S(),attrs:{}}),AS=e=>typeof e=="string"&&e.toLowerCase()==="svg";function FL(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const UL=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function qL(e,t,n,r){FL(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(UL.has(i)?i:mS(i),t.attrs[i])}const oh={};function s9(e){Object.assign(oh,e)}function zL(e,{layout:t,layoutId:n}){return _a.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!oh[e]||e==="opacity")}function OS(e,t,n){var r;const{style:i}=e,o={};for(const s in i)(pn(i[s])||t.style&&pn(t.style[s])||zL(s,e)||((r=n==null?void 0:n.getValue(s))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(o[s]=i[s]);return o}function VL(e,t,n){const r=OS(e,t,n);for(const i in e)if(pn(e[i])||pn(t[i])){const o=al.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}function l9(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const hT=["x","y","width","height","cx","cy","r"],u9={useVisualState:IL({scrapeMotionValuesFromProps:VL,createRenderState:BL,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:i})=>{if(!n)return;let o=!!e.drag;if(!o){for(const l in i)if(_a.has(l)){o=!0;break}}if(!o)return;let s=!t;if(t)for(let l=0;l{l9(n,r),ht.render(()=>{SS(r,i,AS(n.tagName),e.transformTemplate),qL(n,r)})})}})},c9={useVisualState:IL({scrapeMotionValuesFromProps:OS,createRenderState:_S})};function WL(e,t,n){for(const r in t)!pn(t[r])&&!zL(r,n)&&(e[r]=t[r])}function f9({transformTemplate:e},t){return M.useMemo(()=>{const n=_S();return wS(n,t,e),Object.assign({},n.vars,n.style)},[t])}function d9(e,t){const n=e.style||{},r={};return WL(r,n,e),Object.assign(r,f9(e,t)),r}function h9(e,t){const n={},r=d9(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}function p9(e,t,n,r){const i=M.useMemo(()=>{const o=BL();return SS(o,t,AS(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};WL(o,e.style,e),i.style={...o,...i.style}}return i}function m9(e=!1){return(n,r,i,{latestValues:o},s)=>{const c=(vS(n)?p9:h9)(r,o,s,n),f=kK(r,typeof n=="string",e),h=n!==M.Fragment?{...f,...c,ref:i}:{},{children:p}=r,y=M.useMemo(()=>pn(p)?p.get():p,[p]);return M.createElement(n,{...h,children:y})}}function y9(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const s={...vS(r)?u9:c9,preloadedFeatures:e,useRender:m9(i),createVisualElement:t,Component:r};return BK(s)}}function HL(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rwindow.ScrollTimeline!==void 0);class g9{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r{if(v9()&&i.attachTimeline)return i.attachTimeline(t);if(typeof n=="function")return n(i)});return()=>{r.forEach((i,o)=>{i&&i(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;nn[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class b9 extends g9{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function PS(e,t){return e?e[t]||e.default||e:void 0}const rw=2e4;function KL(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t=rw?1/0:t}function ES(e){return typeof e=="function"}function pT(e,t){e.timeline=t,e.onfinish=null}const TS=e=>Array.isArray(e)&&typeof e[0]=="number",x9={linearEasing:void 0};function w9(e,t){const n=dS(e);return()=>{var r;return(r=x9[t])!==null&&r!==void 0?r:n()}}const ah=w9(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),GL=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let o=0;o`cubic-bezier(${e}, ${t}, ${n}, ${r})`,iw={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:_u([0,.65,.55,1]),circOut:_u([.55,0,1,.45]),backIn:_u([.31,.01,.66,-.59]),backOut:_u([.33,1.53,.69,.99])};function XL(e,t){if(e)return typeof e=="function"&&ah()?GL(e,t):TS(e)?_u(e):Array.isArray(e)?e.map(n=>XL(n,t)||iw.easeOut):iw[e]}const gr={x:!1,y:!1};function YL(){return gr.x||gr.y}function ZL(e,t,n){var r;if(e instanceof Element)return[e];if(typeof e=="string"){let i=document;const o=(r=void 0)!==null&&r!==void 0?r:i.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}function JL(e,t){const n=ZL(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function mT(e){return t=>{t.pointerType==="touch"||YL()||e(t)}}function S9(e,t,n={}){const[r,i,o]=JL(e,n),s=mT(l=>{const{target:c}=l,f=t(l);if(typeof f!="function"||!c)return;const h=mT(p=>{f(p),c.removeEventListener("pointerleave",h)});c.addEventListener("pointerleave",h,i)});return r.forEach(l=>{l.addEventListener("pointerenter",s,i)}),o}const e$=(e,t)=>t?e===t?!0:e$(e,t.parentElement):!1,CS=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,_9=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function A9(e){return _9.has(e.tagName)||e.tabIndex!==-1}const Au=new WeakSet;function yT(e){return t=>{t.key==="Enter"&&e(t)}}function dv(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const O9=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=yT(()=>{if(Au.has(n))return;dv(n,"down");const i=yT(()=>{dv(n,"up")}),o=()=>dv(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function vT(e){return CS(e)&&!YL()}function P9(e,t,n={}){const[r,i,o]=JL(e,n),s=l=>{const c=l.currentTarget;if(!vT(l)||Au.has(c))return;Au.add(c);const f=t(l),h=(g,S)=>{window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",y),!(!vT(g)||!Au.has(c))&&(Au.delete(c),typeof f=="function"&&f(g,{success:S}))},p=g=>{h(g,n.useGlobalTarget||e$(c,g.target))},y=g=>{h(g,!1)};window.addEventListener("pointerup",p,i),window.addEventListener("pointercancel",y,i)};return r.forEach(l=>{!A9(l)&&l.getAttribute("tabindex")===null&&(l.tabIndex=0),(n.useGlobalTarget?window:l).addEventListener("pointerdown",s,i),l.addEventListener("focus",f=>O9(f,i),i)}),o}function E9(e){return e==="x"||e==="y"?gr[e]?null:(gr[e]=!0,()=>{gr[e]=!1}):gr.x||gr.y?null:(gr.x=gr.y=!0,()=>{gr.x=gr.y=!1})}const t$=new Set(["width","height","top","left","right","bottom",...al]);let Qd;function T9(){Qd=void 0}const Ur={now:()=>(Qd===void 0&&Ur.set(Zt.isProcessing||AK.useManualTiming?Zt.timestamp:performance.now()),Qd),set:e=>{Qd=e,queueMicrotask(T9)}};function kS(e,t){e.indexOf(t)===-1&&e.push(t)}function RS(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class jS{constructor(){this.subscriptions=[]}add(t){return kS(this.subscriptions,t),()=>RS(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class k9{constructor(t,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const o=Ur.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ur.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=C9(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new jS);const r=this.events[t].add(n);return t==="change"?()=>{r(),ht.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ur.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>gT)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,gT);return n$(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Hu(e,t){return new k9(e,t)}function R9(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Hu(n))}function j9(e,t){const n=wp(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const s in o){const l=WK(o[s]);R9(e,s,l)}}function M9(e){return!!(pn(e)&&e.add)}function ow(e,t){const n=e.getValue("willChange");if(M9(n))return n.add(t)}function r$(e){return e.props[jL]}const i$=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,N9=1e-7,I9=12;function D9(e,t,n,r,i){let o,s,l=0;do s=t+(n-t)/2,o=i$(s,r,i)-e,o>0?n=s:t=s;while(Math.abs(o)>N9&&++lD9(o,0,1,e,n);return o=>o===0||o===1?o:i$(i(o),t,r)}const o$=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,a$=e=>t=>1-e(1-t),s$=Vc(.33,1.53,.69,.99),MS=a$(s$),l$=o$(MS),u$=e=>(e*=2)<1?.5*MS(e):.5*(2-Math.pow(2,-10*(e-1))),NS=e=>1-Math.sin(Math.acos(e)),c$=a$(NS),f$=o$(NS),d$=e=>/^0[^.\s]+$/u.test(e);function L9(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||d$(e):!0}const Ru=e=>Math.round(e*1e5)/1e5,IS=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function $9(e){return e==null}const B9=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,DS=(e,t)=>n=>!!(typeof n=="string"&&B9.test(n)&&n.startsWith(e)||t&&!$9(n)&&Object.prototype.hasOwnProperty.call(n,t)),h$=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,o,s,l]=r.match(IS);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:l!==void 0?parseFloat(l):1}},F9=e=>yi(0,255,e),hv={...sl,transform:e=>Math.round(F9(e))},Ho={test:DS("rgb","red"),parse:h$("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+hv.transform(e)+", "+hv.transform(t)+", "+hv.transform(n)+", "+Ru(Wu.transform(r))+")"};function U9(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const aw={test:DS("#"),parse:U9,transform:Ho.transform},os={test:DS("hsl","hue"),parse:h$("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Fr.transform(Ru(t))+", "+Fr.transform(Ru(n))+", "+Ru(Wu.transform(r))+")"},cn={test:e=>Ho.test(e)||aw.test(e)||os.test(e),parse:e=>Ho.test(e)?Ho.parse(e):os.test(e)?os.parse(e):aw.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ho.transform(e):os.transform(e)},q9=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function z9(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(IS))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(q9))===null||n===void 0?void 0:n.length)||0)>0}const p$="number",m$="color",V9="var",W9="var(",bT="${}",H9=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ku(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const l=t.replace(H9,c=>(cn.test(c)?(r.color.push(o),i.push(m$),n.push(cn.parse(c))):c.startsWith(W9)?(r.var.push(o),i.push(V9),n.push(c)):(r.number.push(o),i.push(p$),n.push(parseFloat(c))),++o,bT)).split(bT);return{values:n,split:l,indexes:r,types:i}}function y$(e){return Ku(e).values}function v$(e){const{split:t,types:n}=Ku(e),r=t.length;return i=>{let o="";for(let s=0;stypeof e=="number"?0:e;function G9(e){const t=y$(e);return v$(e)(t.map(K9))}const ho={test:z9,parse:y$,createTransformer:v$,getAnimatableNone:G9},Q9=new Set(["brightness","contrast","saturate","opacity"]);function X9(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(IS)||[];if(!r)return e;const i=n.replace(r,"");let o=Q9.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const Y9=/\b([a-z-]*)\(.*?\)/gu,sw={...ho,getAnimatableNone:e=>{const t=e.match(Y9);return t?t.map(X9).join(" "):e}},Z9={...xS,color:cn,backgroundColor:cn,outlineColor:cn,fill:cn,stroke:cn,borderColor:cn,borderTopColor:cn,borderRightColor:cn,borderBottomColor:cn,borderLeftColor:cn,filter:sw,WebkitFilter:sw},LS=e=>Z9[e];function g$(e,t){let n=LS(e);return n!==sw&&(n=ho),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const J9=new Set(["auto","none","0"]);function e7(e,t,n){let r=0,i;for(;re===sl||e===Ne,wT=(e,t)=>parseFloat(e.split(", ")[t]),ST=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return wT(i[1],t);{const o=r.match(/^matrix\((.+)\)$/u);return o?wT(o[1],e):0}},t7=new Set(["x","y","z"]),n7=al.filter(e=>!t7.has(e));function r7(e){const t=[];return n7.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Ms={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:ST(4,13),y:ST(5,14)};Ms.translateX=Ms.x;Ms.translateY=Ms.y;const ua=new Set;let lw=!1,uw=!1;function b$(){if(uw){const e=Array.from(ua).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=r7(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([o,s])=>{var l;(l=r.getValue(o))===null||l===void 0||l.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}uw=!1,lw=!1,ua.forEach(e=>e.complete()),ua.clear()}function x$(){ua.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(uw=!0)})}function i7(){x$(),b$()}class $S{constructor(t,n,r,i,o,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ua.add(this),lw||(lw=!0,ht.read(x$),ht.resolveKeyframes(b$))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let o=0;o/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),o7=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function a7(e){const t=o7.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function S$(e,t,n=1){const[r,i]=a7(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const s=o.trim();return w$(s)?parseFloat(s):s}return bS(i)?S$(i,t,n+1):i}const _$=e=>t=>t.test(e),s7={test:e=>e==="auto",parse:e=>e},A$=[sl,Ne,Fr,Hi,YK,XK,s7],_T=e=>A$.find(_$(e));class O$ extends $S{constructor(t,n,r,i,o){super(t,n,r,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c{n.getValue(c).set(f)}),this.resolveNoneKeyframes()}}const AT=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ho.test(e)||e==="0")&&!e.startsWith("url("));function l7(e){const t=e[0];if(e.length===1)return!0;for(let n=0;ne!==null;function Sp(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(c7),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return!o||r===void 0?i[o]:r}const f7=40;class P${constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:s="loop",...l}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Ur.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:s,...l},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>f7?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&i7(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Ur.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:o,delay:s,onComplete:l,onUpdate:c,isGenerator:f}=this.options;if(!f&&!u7(t,r,i,o))if(s)this.options.duration=0;else{c&&c(Sp(t,this.options,n)),l&&l(),this.resolveFinishedPromise();return}const h=this.initPlayback(t,n);h!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...h},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const gt=(e,t,n)=>e+(t-e)*n;function pv(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function d7({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,s=0;if(!t)i=o=s=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;i=pv(c,l,e+1/3),o=pv(c,l,e),s=pv(c,l,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}function sh(e,t){return n=>n>0?t:e}const mv=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},h7=[aw,Ho,os],p7=e=>h7.find(t=>t.test(e));function OT(e){const t=p7(e);if(!t)return!1;let n=t.parse(e);return t===os&&(n=d7(n)),n}const PT=(e,t)=>{const n=OT(e),r=OT(t);if(!n||!r)return sh(e,t);const i={...n};return o=>(i.red=mv(n.red,r.red,o),i.green=mv(n.green,r.green,o),i.blue=mv(n.blue,r.blue,o),i.alpha=gt(n.alpha,r.alpha,o),Ho.transform(i))},m7=(e,t)=>n=>t(e(n)),Wc=(...e)=>e.reduce(m7),cw=new Set(["none","hidden"]);function y7(e,t){return cw.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function v7(e,t){return n=>gt(e,t,n)}function BS(e){return typeof e=="number"?v7:typeof e=="string"?bS(e)?sh:cn.test(e)?PT:x7:Array.isArray(e)?E$:typeof e=="object"?cn.test(e)?PT:g7:sh}function E$(e,t){const n=[...e],r=n.length,i=e.map((o,s)=>BS(o)(o,t[s]));return o=>{for(let s=0;s{for(const o in r)n[o]=r[o](i);return n}}function b7(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let o=0;o{const n=ho.createTransformer(t),r=Ku(e),i=Ku(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?cw.has(e)&&!i.values.length||cw.has(t)&&!r.values.length?y7(e,t):Wc(E$(b7(r,i),i.values),n):sh(e,t)};function T$(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?gt(e,t,n):BS(e)(e,t)}const w7=5;function C$(e,t,n){const r=Math.max(t-w7,0);return n$(n-e(r),t-r)}const St={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},yv=.001;function S7({duration:e=St.duration,bounce:t=St.bounce,velocity:n=St.velocity,mass:r=St.mass}){let i,o,s=1-t;s=yi(St.minDamping,St.maxDamping,s),e=yi(St.minDuration,St.maxDuration,di(e)),s<1?(i=f=>{const h=f*s,p=h*e,y=h-n,g=fw(f,s),S=Math.exp(-p);return yv-y/g*S},o=f=>{const p=f*s*e,y=p*n+n,g=Math.pow(s,2)*Math.pow(f,2)*e,S=Math.exp(-p),b=fw(Math.pow(f,2),s);return(-i(f)+yv>0?-1:1)*((y-g)*S)/b}):(i=f=>{const h=Math.exp(-f*e),p=(f-n)*e+1;return-yv+h*p},o=f=>{const h=Math.exp(-f*e),p=(n-f)*(e*e);return h*p});const l=5/e,c=A7(i,o,l);if(e=fi(e),isNaN(c))return{stiffness:St.stiffness,damping:St.damping,duration:e};{const f=Math.pow(c,2)*r;return{stiffness:f,damping:s*2*Math.sqrt(r*f),duration:e}}}const _7=12;function A7(e,t,n){let r=n;for(let i=1;i<_7;i++)r=r-e(r)/t(r);return r}function fw(e,t){return e*Math.sqrt(1-t*t)}const O7=["duration","bounce"],P7=["stiffness","damping","mass"];function ET(e,t){return t.some(n=>e[n]!==void 0)}function E7(e){let t={velocity:St.velocity,stiffness:St.stiffness,damping:St.damping,mass:St.mass,isResolvedFromDuration:!1,...e};if(!ET(e,P7)&&ET(e,O7))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,o=2*yi(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:St.mass,stiffness:i,damping:o}}else{const n=S7(e);t={...t,...n,mass:St.mass},t.isResolvedFromDuration=!0}return t}function k$(e=St.visualDuration,t=St.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const o=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],l={done:!1,value:o},{stiffness:c,damping:f,mass:h,duration:p,velocity:y,isResolvedFromDuration:g}=E7({...n,velocity:-di(n.velocity||0)}),S=y||0,b=f/(2*Math.sqrt(c*h)),v=s-o,w=di(Math.sqrt(c/h)),A=Math.abs(v)<5;r||(r=A?St.restSpeed.granular:St.restSpeed.default),i||(i=A?St.restDelta.granular:St.restDelta.default);let O;if(b<1){const P=fw(w,b);O=C=>{const k=Math.exp(-b*w*C);return s-k*((S+b*w*v)/P*Math.sin(P*C)+v*Math.cos(P*C))}}else if(b===1)O=P=>s-Math.exp(-w*P)*(v+(S+w*v)*P);else{const P=w*Math.sqrt(b*b-1);O=C=>{const k=Math.exp(-b*w*C),j=Math.min(P*C,300);return s-k*((S+b*w*v)*Math.sinh(j)+P*v*Math.cosh(j))/P}}const T={calculatedDuration:g&&p||null,next:P=>{const C=O(P);if(g)l.done=P>=p;else{let k=0;b<1&&(k=P===0?fi(S):C$(O,P,C));const j=Math.abs(k)<=r,N=Math.abs(s-C)<=i;l.done=j&&N}return l.value=l.done?s:C,l},toString:()=>{const P=Math.min(KL(T),rw),C=GL(k=>T.next(P*k).value,P,30);return P+"ms "+C}};return T}function TT({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:l,max:c,restDelta:f=.5,restSpeed:h}){const p=e[0],y={done:!1,value:p},g=j=>l!==void 0&&jc,S=j=>l===void 0?c:c===void 0||Math.abs(l-j)-b*Math.exp(-j/r),O=j=>w+A(j),T=j=>{const N=A(j),U=O(j);y.done=Math.abs(N)<=f,y.value=y.done?w:U};let P,C;const k=j=>{g(y.value)&&(P=j,C=k$({keyframes:[y.value,S(y.value)],velocity:C$(O,j,y.value),damping:i,stiffness:o,restDelta:f,restSpeed:h}))};return k(0),{calculatedDuration:null,next:j=>{let N=!1;return!C&&P===void 0&&(N=!0,T(j),k(j)),P!==void 0&&j>=P?C.next(j-P):(!N&&T(j),y)}}}const T7=Vc(.42,0,1,1),C7=Vc(0,0,.58,1),R$=Vc(.42,0,.58,1),k7=e=>Array.isArray(e)&&typeof e[0]!="number",R7={linear:qn,easeIn:T7,easeInOut:R$,easeOut:C7,circIn:NS,circInOut:f$,circOut:c$,backIn:MS,backInOut:l$,backOut:s$,anticipate:u$},CT=e=>{if(TS(e)){EL(e.length===4);const[t,n,r,i]=e;return Vc(t,n,r,i)}else if(typeof e=="string")return R7[e];return e};function j7(e,t,n){const r=[],i=n||T$,o=e.length-1;for(let s=0;st[0];if(o===2&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=j7(t,r,i),c=l.length,f=h=>{if(s&&h1)for(;pf(yi(e[0],e[o-1],h)):f}function N7(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Rs(0,t,r);e.push(gt(n,1,i))}}function I7(e){const t=[0];return N7(t,e.length-1),t}function D7(e,t){return e.map(n=>n*t)}function L7(e,t){return e.map(()=>t||R$).splice(0,e.length-1)}function lh({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=k7(r)?r.map(CT):CT(r),o={done:!1,value:t[0]},s=D7(n&&n.length===t.length?n:I7(t),e),l=M7(s,t,{ease:Array.isArray(i)?i:L7(t,i)});return{calculatedDuration:e,next:c=>(o.value=l(c),o.done=c>=e,o)}}const $7=e=>{const t=({timestamp:n})=>e(n);return{start:()=>ht.update(t,!0),stop:()=>fo(t),now:()=>Zt.isProcessing?Zt.timestamp:Ur.now()}},B7={decay:TT,inertia:TT,tween:lh,keyframes:lh,spring:k$},F7=e=>e/100;class FS extends P${constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:c}=this.options;c&&c()};const{name:n,motionValue:r,element:i,keyframes:o}=this.options,s=(i==null?void 0:i.KeyframeResolver)||$S,l=(c,f)=>this.onKeyframesResolved(c,f);this.resolver=new s(o,l,n,r,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:s=0}=this.options,l=ES(n)?n:B7[n]||lh;let c,f;l!==lh&&typeof t[0]!="number"&&(c=Wc(F7,T$(t[0],t[1])),t=[0,100]);const h=l({...this.options,keyframes:t});o==="mirror"&&(f=l({...this.options,keyframes:[...t].reverse(),velocity:-s})),h.calculatedDuration===null&&(h.calculatedDuration=KL(h));const{calculatedDuration:p}=h,y=p+i,g=y*(r+1)-i;return{generator:h,mirroredGenerator:f,mapPercentToKeyframes:c,calculatedDuration:p,resolvedDuration:y,totalDuration:g}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:j}=this.options;return{done:!0,value:j[j.length-1]}}const{finalKeyframe:i,generator:o,mirroredGenerator:s,mapPercentToKeyframes:l,keyframes:c,calculatedDuration:f,totalDuration:h,resolvedDuration:p}=r;if(this.startTime===null)return o.next(0);const{delay:y,repeat:g,repeatType:S,repeatDelay:b,onUpdate:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-h/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const w=this.currentTime-y*(this.speed>=0?1:-1),A=this.speed>=0?w<0:w>h;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=h);let O=this.currentTime,T=o;if(g){const j=Math.min(this.currentTime,h)/p;let N=Math.floor(j),U=j%1;!U&&j>=1&&(U=1),U===1&&N--,N=Math.min(N,g+1),!!(N%2)&&(S==="reverse"?(U=1-U,b&&(U-=b/p)):S==="mirror"&&(T=s)),O=yi(0,1,U)*p}const P=A?{done:!1,value:c[0]}:T.next(O);l&&(P.value=l(P.value));let{done:C}=P;!A&&f!==null&&(C=this.speed>=0?this.currentTime>=h:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return k&&i!==void 0&&(P.value=Sp(c,this.options,i)),v&&v(P.value),k&&this.finish(),P}get duration(){const{resolved:t}=this;return t?di(t.calculatedDuration):0}get time(){return di(this.currentTime)}set time(t){t=fi(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=di(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=$7,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const U7=new Set(["opacity","clipPath","filter","transform"]);function q7(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:l="easeInOut",times:c}={}){const f={[t]:n};c&&(f.offset=c);const h=XL(l,i);return Array.isArray(h)&&(f.easing=h),e.animate(f,{delay:r,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"})}const z7=dS(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),uh=10,V7=2e4;function W7(e){return ES(e.type)||e.type==="spring"||!QL(e.ease)}function H7(e,t){const n=new FS({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let o=0;for(;!r.done&&othis.onKeyframesResolved(s,l),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:i,ease:o,type:s,motionValue:l,name:c,startTime:f}=this.options;if(!l.owner||!l.owner.current)return!1;if(typeof o=="string"&&ah()&&K7(o)&&(o=j$[o]),W7(this.options)){const{onComplete:p,onUpdate:y,motionValue:g,element:S,...b}=this.options,v=H7(t,b);t=v.keyframes,t.length===1&&(t[1]=t[0]),r=v.duration,i=v.times,o=v.ease,s="keyframes"}const h=q7(l.owner.current,c,t,{...this.options,duration:r,times:i,ease:o});return h.startTime=f??this.calcStartTime(),this.pendingTimeline?(pT(h,this.pendingTimeline),this.pendingTimeline=void 0):h.onfinish=()=>{const{onComplete:p}=this.options;l.set(Sp(t,this.options,n)),p&&p(),this.cancel(),this.resolveFinishedPromise()},{animation:h,duration:r,times:i,type:s,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return di(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return di(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=fi(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return qn;const{animation:r}=n;pT(r,t)}return qn}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:o,ease:s,times:l}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:f,onUpdate:h,onComplete:p,element:y,...g}=this.options,S=new FS({...g,keyframes:r,duration:i,type:o,ease:s,times:l,isGenerator:!0}),b=fi(this.time);f.setWithVelocity(S.sample(b-uh).value,S.sample(b).value,uh)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:o,damping:s,type:l}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:f}=n.owner.getProps();return z7()&&r&&U7.has(r)&&!c&&!f&&!i&&o!=="mirror"&&s!==0&&l!=="inertia"}}const G7={type:"spring",stiffness:500,damping:25,restSpeed:10},Q7=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),X7={type:"keyframes",duration:.8},Y7={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Z7=(e,{keyframes:t})=>t.length>2?X7:_a.has(e)?e.startsWith("scale")?Q7(t[1]):G7:Y7;function J7({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:l,from:c,elapsed:f,...h}){return!!Object.keys(h).length}const US=(e,t,n,r={},i,o)=>s=>{const l=PS(r,e)||{},c=l.delay||r.delay||0;let{elapsed:f=0}=r;f=f-fi(c);let h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-f,onUpdate:y=>{t.set(y),l.onUpdate&&l.onUpdate(y)},onComplete:()=>{s(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:o?void 0:i};J7(l)||(h={...h,...Z7(e,h)}),h.duration&&(h.duration=fi(h.duration)),h.repeatDelay&&(h.repeatDelay=fi(h.repeatDelay)),h.from!==void 0&&(h.keyframes[0]=h.from);let p=!1;if((h.type===!1||h.duration===0&&!h.repeatDelay)&&(h.duration=0,h.delay===0&&(p=!0)),p&&!o&&t.get()!==void 0){const y=Sp(h.keyframes,l);if(y!==void 0)return ht.update(()=>{h.onUpdate(y),h.onComplete()}),new b9([])}return!o&&kT.supports(h)?new kT(h):new FS(h)};function eG({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function M$(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:s=e.getDefaultTransition(),transitionEnd:l,...c}=t;r&&(s=r);const f=[],h=i&&e.animationState&&e.animationState.getState()[i];for(const p in c){const y=e.getValue(p,(o=e.latestValues[p])!==null&&o!==void 0?o:null),g=c[p];if(g===void 0||h&&eG(h,p))continue;const S={delay:n,...PS(s||{},p)};let b=!1;if(window.MotionHandoffAnimation){const w=r$(e);if(w){const A=window.MotionHandoffAnimation(w,p,ht);A!==null&&(S.startTime=A,b=!0)}}ow(e,p),y.start(US(p,y,g,e.shouldReduceMotion&&t$.has(p)?{type:!1}:S,e,b));const v=y.animation;v&&f.push(v)}return l&&Promise.all(f).then(()=>{ht.update(()=>{l&&j9(e,l)})}),f}function dw(e,t,n={}){var r;const i=wp(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const s=i?()=>Promise.all(M$(e,i,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(f=0)=>{const{delayChildren:h=0,staggerChildren:p,staggerDirection:y}=o;return tG(e,t,h+f,p,y,n)}:()=>Promise.resolve(),{when:c}=o;if(c){const[f,h]=c==="beforeChildren"?[s,l]:[l,s];return f().then(()=>h())}else return Promise.all([s(),l(n.delay)])}function tG(e,t,n=0,r=0,i=1,o){const s=[],l=(e.variantChildren.size-1)*r,c=i===1?(f=0)=>f*r:(f=0)=>l-f*r;return Array.from(e.variantChildren).sort(nG).forEach((f,h)=>{f.notify("AnimationStart",t),s.push(dw(f,t,{...o,delay:n+c(h)}).then(()=>f.notify("AnimationComplete",t)))}),Promise.all(s)}function nG(e,t){return e.sortNodePosition(t)}function rG(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>dw(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=dw(e,t,n);else{const i=typeof t=="function"?wp(e,t,n.custom):t;r=Promise.all(M$(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const iG=pS.length;function N$(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?N$(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;nPromise.all(t.map(({animation:n,options:r})=>rG(e,n,r)))}function lG(e){let t=sG(e),n=RT(),r=!0;const i=c=>(f,h)=>{var p;const y=wp(e,h,c==="exit"?(p=e.presenceContext)===null||p===void 0?void 0:p.custom:void 0);if(y){const{transition:g,transitionEnd:S,...b}=y;f={...f,...b,...S}}return f};function o(c){t=c(e)}function s(c){const{props:f}=e,h=N$(e.parent)||{},p=[],y=new Set;let g={},S=1/0;for(let v=0;vS&&T,N=!1;const U=Array.isArray(O)?O:[O];let L=U.reduce(i(w),{});P===!1&&(L={});const{prevResolvedValues:$={}}=A,G={...$,...L},F=ee=>{j=!0,y.has(ee)&&(N=!0,y.delete(ee)),A.needsAnimating[ee]=!0;const Q=e.getValue(ee);Q&&(Q.liveStyle=!1)};for(const ee in G){const Q=L[ee],ne=$[ee];if(g.hasOwnProperty(ee))continue;let V=!1;nw(Q)&&nw(ne)?V=!HL(Q,ne):V=Q!==ne,V?Q!=null?F(ee):y.add(ee):Q!==void 0&&y.has(ee)?F(ee):A.protectedKeys[ee]=!0}A.prevProp=O,A.prevResolvedValues=L,A.isActive&&(g={...g,...L}),r&&e.blockInitialAnimation&&(j=!1),j&&(!(C&&k)||N)&&p.push(...U.map(ee=>({animation:ee,options:{type:w}})))}if(y.size){const v={};y.forEach(w=>{const A=e.getBaseTarget(w),O=e.getValue(w);O&&(O.liveStyle=!0),v[w]=A??null}),p.push({animation:v})}let b=!!p.length;return r&&(f.initial===!1||f.initial===f.animate)&&!e.manuallyAnimateOnMount&&(b=!1),r=!1,b?t(p):Promise.resolve()}function l(c,f){var h;if(n[c].isActive===f)return Promise.resolve();(h=e.variantChildren)===null||h===void 0||h.forEach(y=>{var g;return(g=y.animationState)===null||g===void 0?void 0:g.setActive(c,f)}),n[c].isActive=f;const p=s(c);for(const y in n)n[y].protectedKeys={};return p}return{animateChanges:s,setActive:l,setAnimateFunction:o,getState:()=>n,reset:()=>{n=RT(),r=!0}}}function uG(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!HL(t,e):!1}function Lo(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function RT(){return{animate:Lo(!0),whileInView:Lo(),whileHover:Lo(),whileTap:Lo(),whileDrag:Lo(),whileFocus:Lo(),exit:Lo()}}class mo{constructor(t){this.isMounted=!1,this.node=t}update(){}}class cG extends mo{constructor(t){super(t),t.animationState||(t.animationState=lG(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();bp(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let fG=0;class dG extends mo{constructor(){super(...arguments),this.id=fG++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const hG={animation:{Feature:cG},exit:{Feature:dG}};function Gu(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Hc(e){return{point:{x:e.pageX,y:e.pageY}}}const pG=e=>t=>CS(t)&&e(t,Hc(t));function ju(e,t,n,r){return Gu(e,t,pG(n),r)}const jT=(e,t)=>Math.abs(e-t);function mG(e,t){const n=jT(e.x,t.x),r=jT(e.y,t.y);return Math.sqrt(n**2+r**2)}class I${constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=gv(this.lastMoveEventInfo,this.history),y=this.startEvent!==null,g=mG(p.offset,{x:0,y:0})>=3;if(!y&&!g)return;const{point:S}=p,{timestamp:b}=Zt;this.history.push({...S,timestamp:b});const{onStart:v,onMove:w}=this.handlers;y||(v&&v(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,p)},this.handlePointerMove=(p,y)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=vv(y,this.transformPagePoint),ht.update(this.updatePoint,!0)},this.handlePointerUp=(p,y)=>{this.end();const{onEnd:g,onSessionEnd:S,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=gv(p.type==="pointercancel"?this.lastMoveEventInfo:vv(y,this.transformPagePoint),this.history);this.startEvent&&g&&g(p,v),S&&S(p,v)},!CS(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const s=Hc(t),l=vv(s,this.transformPagePoint),{point:c}=l,{timestamp:f}=Zt;this.history=[{...c,timestamp:f}];const{onSessionStart:h}=n;h&&h(t,gv(l,this.history)),this.removeListeners=Wc(ju(this.contextWindow,"pointermove",this.handlePointerMove),ju(this.contextWindow,"pointerup",this.handlePointerUp),ju(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),fo(this.updatePoint)}}function vv(e,t){return t?{point:t(e.point)}:e}function MT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function gv({point:e},t){return{point:e,delta:MT(e,D$(t)),offset:MT(e,yG(t)),velocity:vG(t,.1)}}function yG(e){return e[0]}function D$(e){return e[e.length-1]}function vG(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=D$(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>fi(t)));)n--;if(!r)return{x:0,y:0};const o=di(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}const L$=1e-4,gG=1-L$,bG=1+L$,$$=.01,xG=0-$$,wG=0+$$;function zn(e){return e.max-e.min}function SG(e,t,n){return Math.abs(e-t)<=n}function NT(e,t,n,r=.5){e.origin=r,e.originPoint=gt(t.min,t.max,e.origin),e.scale=zn(n)/zn(t),e.translate=gt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=gG&&e.scale<=bG||isNaN(e.scale))&&(e.scale=1),(e.translate>=xG&&e.translate<=wG||isNaN(e.translate))&&(e.translate=0)}function Mu(e,t,n,r){NT(e.x,t.x,n.x,r?r.originX:void 0),NT(e.y,t.y,n.y,r?r.originY:void 0)}function IT(e,t,n){e.min=n.min+t.min,e.max=e.min+zn(t)}function _G(e,t,n){IT(e.x,t.x,n.x),IT(e.y,t.y,n.y)}function DT(e,t,n){e.min=t.min-n.min,e.max=e.min+zn(t)}function Nu(e,t,n){DT(e.x,t.x,n.x),DT(e.y,t.y,n.y)}function AG(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?gt(n,e,r.max):Math.min(e,n)),e}function LT(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function OG(e,{top:t,left:n,bottom:r,right:i}){return{x:LT(e.x,n,i),y:LT(e.y,t,r)}}function $T(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Rs(t.min,t.max-r,e.min):r>i&&(n=Rs(e.min,e.max-i,t.min)),yi(0,1,n)}function TG(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const hw=.35;function CG(e=hw){return e===!1?e=0:e===!0&&(e=hw),{x:BT(e,"left","right"),y:BT(e,"top","bottom")}}function BT(e,t,n){return{min:FT(e,t),max:FT(e,n)}}function FT(e,t){return typeof e=="number"?e:e[t]||0}const UT=()=>({translate:0,scale:1,origin:0,originPoint:0}),as=()=>({x:UT(),y:UT()}),qT=()=>({min:0,max:0}),Pt=()=>({x:qT(),y:qT()});function tr(e){return[e("x"),e("y")]}function B$({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function kG({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function RG(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function bv(e){return e===void 0||e===1}function pw({scale:e,scaleX:t,scaleY:n}){return!bv(e)||!bv(t)||!bv(n)}function Fo(e){return pw(e)||F$(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function F$(e){return zT(e.x)||zT(e.y)}function zT(e){return e&&e!=="0%"}function ch(e,t,n){const r=e-n,i=t*r;return n+i}function VT(e,t,n,r,i){return i!==void 0&&(e=ch(e,i,r)),ch(e,n,r)+t}function mw(e,t=0,n=1,r,i){e.min=VT(e.min,t,n,r,i),e.max=VT(e.max,t,n,r,i)}function U$(e,{x:t,y:n}){mw(e.x,t.translate,t.scale,t.originPoint),mw(e.y,n.translate,n.scale,n.originPoint)}const WT=.999999999999,HT=1.0000000000001;function jG(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,s;for(let l=0;lWT&&(t.x=1),t.yWT&&(t.y=1)}function ss(e,t){e.min=e.min+t,e.max=e.max+t}function KT(e,t,n,r,i=.5){const o=gt(e.min,e.max,i);mw(e,t,n,o,r)}function ls(e,t){KT(e.x,t.x,t.scaleX,t.scale,t.originX),KT(e.y,t.y,t.scaleY,t.scale,t.originY)}function q$(e,t){return B$(RG(e.getBoundingClientRect(),t))}function MG(e,t,n){const r=q$(e,n),{scroll:i}=t;return i&&(ss(r.x,i.offset.x),ss(r.y,i.offset.y)),r}const z$=({current:e})=>e?e.ownerDocument.defaultView:null,NG=new WeakMap;class IG{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Pt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=h=>{const{dragSnapToOrigin:p}=this.getProps();p?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Hc(h).point)},o=(h,p)=>{const{drag:y,dragPropagation:g,onDragStart:S}=this.getProps();if(y&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=E9(y),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),tr(v=>{let w=this.getAxisMotionValue(v).get()||0;if(Fr.test(w)){const{projection:A}=this.visualElement;if(A&&A.layout){const O=A.layout.layoutBox[v];O&&(w=zn(O)*(parseFloat(w)/100))}}this.originPoint[v]=w}),S&&ht.postRender(()=>S(h,p)),ow(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},s=(h,p)=>{const{dragPropagation:y,dragDirectionLock:g,onDirectionLock:S,onDrag:b}=this.getProps();if(!y&&!this.openDragLock)return;const{offset:v}=p;if(g&&this.currentDirection===null){this.currentDirection=DG(v),this.currentDirection!==null&&S&&S(this.currentDirection);return}this.updateAxis("x",p.point,v),this.updateAxis("y",p.point,v),this.visualElement.render(),b&&b(h,p)},l=(h,p)=>this.stop(h,p),c=()=>tr(h=>{var p;return this.getAnimationState(h)==="paused"&&((p=this.getAxisMotionValue(h).animation)===null||p===void 0?void 0:p.play())}),{dragSnapToOrigin:f}=this.getProps();this.panSession=new I$(t,{onSessionStart:i,onStart:o,onMove:s,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:f,contextWindow:z$(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&ht.postRender(()=>o(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Ad(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=AG(s,this.constraints[t],this.elastic[t])),o.set(s)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,o=this.constraints;n&&is(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=OG(i.layoutBox,n):this.constraints=!1,this.elastic=CG(r),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&tr(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=TG(i.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!is(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=MG(r,i.root,this.visualElement.getTransformPagePoint());let s=PG(i.layout.layoutBox,o);if(n){const l=n(kG(s));this.hasMutatedConstraints=!!l,l&&(s=B$(l))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},f=tr(h=>{if(!Ad(h,n,this.currentDirection))return;let p=c&&c[h]||{};s&&(p={min:0,max:0});const y=i?200:1e6,g=i?40:1e7,S={type:"inertia",velocity:r?t[h]:0,bounceStiffness:y,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...o,...p};return this.startAxisValueAnimation(h,S)});return Promise.all(f).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return ow(this.visualElement,t),r.start(US(t,r,0,n,this.visualElement,!1))}stopAnimation(){tr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){tr(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){tr(n=>{const{drag:r}=this.getProps();if(!Ad(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:l}=i.layout.layoutBox[n];o.set(t[n]-gt(s,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!is(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};tr(s=>{const l=this.getAxisMotionValue(s);if(l&&this.constraints!==!1){const c=l.get();i[s]=EG({min:c,max:c},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),tr(s=>{if(!Ad(s,t,null))return;const l=this.getAxisMotionValue(s),{min:c,max:f}=this.constraints[s];l.set(gt(c,f,i[s]))})}addListeners(){if(!this.visualElement.current)return;NG.set(this.visualElement,this);const t=this.visualElement.current,n=ju(t,"pointerdown",c=>{const{drag:f,dragListener:h=!0}=this.getProps();f&&h&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();is(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ht.read(r);const s=Gu(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:f})=>{this.isDragging&&f&&(tr(h=>{const p=this.getAxisMotionValue(h);p&&(this.originPoint[h]+=c[h].translate,p.set(p.get()+c[h].translate))}),this.visualElement.render())}));return()=>{s(),n(),o(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=hw,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:l}}}function Ad(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function DG(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class LG extends mo{constructor(t){super(t),this.removeGroupControls=qn,this.removeListeners=qn,this.controls=new IG(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||qn}unmount(){this.removeGroupControls(),this.removeListeners()}}const GT=e=>(t,n)=>{e&&ht.postRender(()=>e(t,n))};class $G extends mo{constructor(){super(...arguments),this.removePointerDownListener=qn}onPointerDown(t){this.session=new I$(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:z$(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:GT(t),onStart:GT(n),onMove:r,onEnd:(o,s)=>{delete this.session,i&&ht.postRender(()=>i(o,s))}}}mount(){this.removePointerDownListener=ju(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Xd={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function QT(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const lu={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ne.test(e))e=parseFloat(e);else return e;const n=QT(e,t.target.x),r=QT(e,t.target.y);return`${n}% ${r}%`}},BG={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=ho.parse(e);if(i.length>5)return r;const o=ho.createTransformer(e),s=typeof i[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;i[0+s]/=l,i[1+s]/=c;const f=gt(l,c,.5);return typeof i[2+s]=="number"&&(i[2+s]/=f),typeof i[3+s]=="number"&&(i[3+s]/=f),o(i)}};class FG extends M.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;s9(UG),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Xd.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,s=r.projection;return s&&(s.isPresent=o,i||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?s.promote():s.relegate()||ht.postRender(()=>{const l=s.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),yS.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function V$(e){const[t,n]=SK(),r=M.useContext(OL);return E.jsx(FG,{...e,layoutGroup:r,switchLayoutGroup:M.useContext(ML),isPresent:t,safeToRemove:n})}const UG={borderRadius:{...lu,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:lu,borderTopRightRadius:lu,borderBottomLeftRadius:lu,borderBottomRightRadius:lu,boxShadow:BG};function qG(e,t,n){const r=pn(e)?e:Hu(e);return r.start(US("",r,t,n)),r.animation}function zG(e){return e instanceof SVGElement&&e.tagName!=="svg"}const VG=(e,t)=>e.depth-t.depth;class WG{constructor(){this.children=[],this.isDirty=!1}add(t){kS(this.children,t),this.isDirty=!0}remove(t){RS(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(VG),this.isDirty=!1,this.children.forEach(t)}}function HG(e,t){const n=Ur.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(fo(r),e(o-t))};return ht.read(r,!0),()=>fo(r)}const W$=["TopLeft","TopRight","BottomLeft","BottomRight"],KG=W$.length,XT=e=>typeof e=="string"?parseFloat(e):e,YT=e=>typeof e=="number"||Ne.test(e);function GG(e,t,n,r,i,o){i?(e.opacity=gt(0,n.opacity!==void 0?n.opacity:1,QG(r)),e.opacityExit=gt(t.opacity!==void 0?t.opacity:1,0,XG(r))):o&&(e.opacity=gt(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;srt?1:n(Rs(e,t,r))}function JT(e,t){e.min=t.min,e.max=t.max}function Yn(e,t){JT(e.x,t.x),JT(e.y,t.y)}function eC(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function tC(e,t,n,r,i){return e-=t,e=ch(e,1/n,r),i!==void 0&&(e=ch(e,1/i,r)),e}function YG(e,t=0,n=1,r=.5,i,o=e,s=e){if(Fr.test(t)&&(t=parseFloat(t),t=gt(s.min,s.max,t/100)-s.min),typeof t!="number")return;let l=gt(o.min,o.max,r);e===o&&(l-=t),e.min=tC(e.min,t,n,l,i),e.max=tC(e.max,t,n,l,i)}function nC(e,t,[n,r,i],o,s){YG(e,t[n],t[r],t[i],t.scale,o,s)}const ZG=["x","scaleX","originX"],JG=["y","scaleY","originY"];function rC(e,t,n,r){nC(e.x,t,ZG,n?n.x:void 0,r?r.x:void 0),nC(e.y,t,JG,n?n.y:void 0,r?r.y:void 0)}function iC(e){return e.translate===0&&e.scale===1}function K$(e){return iC(e.x)&&iC(e.y)}function oC(e,t){return e.min===t.min&&e.max===t.max}function eQ(e,t){return oC(e.x,t.x)&&oC(e.y,t.y)}function aC(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function G$(e,t){return aC(e.x,t.x)&&aC(e.y,t.y)}function sC(e){return zn(e.x)/zn(e.y)}function lC(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class tQ{constructor(){this.members=[]}add(t){kS(this.members,t),t.scheduleRender()}remove(t){if(RS(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function nQ(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,s=(n==null?void 0:n.z)||0;if((i||o||s)&&(r=`translate3d(${i}px, ${o}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:f,rotate:h,rotateX:p,rotateY:y,skewX:g,skewY:S}=n;f&&(r=`perspective(${f}px) ${r}`),h&&(r+=`rotate(${h}deg) `),p&&(r+=`rotateX(${p}deg) `),y&&(r+=`rotateY(${y}deg) `),g&&(r+=`skewX(${g}deg) `),S&&(r+=`skewY(${S}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(r+=`scale(${l}, ${c})`),r||"none"}const Uo={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Ou=typeof window<"u"&&window.MotionDebug!==void 0,xv=["","X","Y","Z"],rQ={visibility:"hidden"},uC=1e3;let iQ=0;function wv(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Q$(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=r$(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ht,!(i||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Q$(r)}function X$({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},l=t==null?void 0:t()){this.id=iQ++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Ou&&(Uo.totalNodes=Uo.resolvedTargetDeltas=Uo.recalculatedProjection=0),this.nodes.forEach(sQ),this.nodes.forEach(dQ),this.nodes.forEach(hQ),this.nodes.forEach(lQ),Ou&&window.MotionDebug.record(Uo)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;cthis.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,p&&p(),p=HG(y,250),Xd.hasAnimatedSinceResize&&(Xd.hasAnimatedSinceResize=!1,this.nodes.forEach(fC))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&h&&(c||f)&&this.addEventListener("didUpdate",({delta:p,hasLayoutChanged:y,hasRelativeTargetChanged:g,layout:S})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||h.getDefaultTransition()||gQ,{onLayoutAnimationStart:v,onLayoutAnimationComplete:w}=h.getProps(),A=!this.targetLayout||!G$(this.targetLayout,S)||g,O=!y&&g;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||O||y&&(A||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(p,O);const T={...PS(b,"layout"),onPlay:v,onComplete:w};(h.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else y||fC(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=S})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,fo(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(pQ),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Q$(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c{const P=T/1e3;dC(p.x,s.x,P),dC(p.y,s.y,P),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Nu(y,this.layout.layoutBox,this.relativeParent.layout.layoutBox),yQ(this.relativeTarget,this.relativeTargetOrigin,y,P),O&&eQ(this.relativeTarget,O)&&(this.isProjectionDirty=!1),O||(O=Pt()),Yn(O,this.relativeTarget)),b&&(this.animationValues=h,GG(h,f,this.latestValues,P,A,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(fo(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ht.update(()=>{Xd.hasAnimatedSinceResize=!0,this.currentAnimation=qG(0,uC,{...s,onUpdate:l=>{this.mixTargetDelta(l),s.onUpdate&&s.onUpdate(l)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(uC),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:l,target:c,layout:f,latestValues:h}=s;if(!(!l||!c||!f)){if(this!==s&&this.layout&&f&&Y$(this.options.animationType,this.layout.layoutBox,f.layoutBox)){c=this.target||Pt();const p=zn(this.layout.layoutBox.x);c.x.min=s.target.x.min,c.x.max=c.x.min+p;const y=zn(this.layout.layoutBox.y);c.y.min=s.target.y.min,c.y.max=c.y.min+y}Yn(l,c),ls(l,h),Mu(this.projectionDeltaWithTransform,this.layoutCorrected,l,h)}}registerSharedNode(s,l){this.sharedNodes.has(s)||this.sharedNodes.set(s,new tQ),this.sharedNodes.get(s).add(l);const f=l.options.initialPromotionConfig;l.promote({transition:f?f.transition:void 0,preserveFollowOpacity:f&&f.shouldPreserveFollowOpacity?f.shouldPreserveFollowOpacity(l):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:l}=this.options;return l?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:l}=this.options;return l?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:l,preserveFollowOpacity:c}={}){const f=this.getStack();f&&f.promote(this,c),s&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let l=!1;const{latestValues:c}=s;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const f={};c.z&&wv("z",s,f,this.animationValues);for(let h=0;h{var l;return(l=s.currentAnimation)===null||l===void 0?void 0:l.stop()}),this.root.nodes.forEach(cC),this.root.sharedNodes.clear()}}}function oQ(e){e.updateLayout()}function aQ(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:o}=e.options,s=n.source!==e.layout.source;o==="size"?tr(p=>{const y=s?n.measuredBox[p]:n.layoutBox[p],g=zn(y);y.min=r[p].min,y.max=y.min+g}):Y$(o,n.layoutBox,r)&&tr(p=>{const y=s?n.measuredBox[p]:n.layoutBox[p],g=zn(r[p]);y.max=y.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[p].max=e.relativeTarget[p].min+g)});const l=as();Mu(l,r,n.layoutBox);const c=as();s?Mu(c,e.applyTransform(i,!0),n.measuredBox):Mu(c,r,n.layoutBox);const f=!K$(l);let h=!1;if(!e.resumeFrom){const p=e.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:y,layout:g}=p;if(y&&g){const S=Pt();Nu(S,n.layoutBox,y.layoutBox);const b=Pt();Nu(b,r,g.layoutBox),G$(S,b)||(h=!0),p.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=S,e.relativeParent=p)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:c,layoutDelta:l,hasLayoutChanged:f,hasRelativeTargetChanged:h})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function sQ(e){Ou&&Uo.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function lQ(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function uQ(e){e.clearSnapshot()}function cC(e){e.clearMeasurements()}function cQ(e){e.isLayoutDirty=!1}function fQ(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function fC(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function dQ(e){e.resolveTargetDelta()}function hQ(e){e.calcProjection()}function pQ(e){e.resetSkewAndRotation()}function mQ(e){e.removeLeadSnapshot()}function dC(e,t,n){e.translate=gt(t.translate,0,n),e.scale=gt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function hC(e,t,n,r){e.min=gt(t.min,n.min,r),e.max=gt(t.max,n.max,r)}function yQ(e,t,n,r){hC(e.x,t.x,n.x,r),hC(e.y,t.y,n.y,r)}function vQ(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const gQ={duration:.45,ease:[.4,0,.1,1]},pC=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),mC=pC("applewebkit/")&&!pC("chrome/")?Math.round:qn;function yC(e){e.min=mC(e.min),e.max=mC(e.max)}function bQ(e){yC(e.x),yC(e.y)}function Y$(e,t,n){return e==="position"||e==="preserve-aspect"&&!SG(sC(t),sC(n),.2)}function xQ(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const wQ=X$({attachResizeListener:(e,t)=>Gu(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Sv={current:void 0},Z$=X$({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Sv.current){const e=new wQ({});e.mount(window),e.setOptions({layoutScroll:!0}),Sv.current=e}return Sv.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),SQ={pan:{Feature:$G},drag:{Feature:LG,ProjectionNode:Z$,MeasureLayout:V$}};function vC(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=r[i];o&&ht.postRender(()=>o(t,Hc(t)))}class _Q extends mo{mount(){const{current:t}=this.node;t&&(this.unmount=S9(t,n=>(vC(this.node,n,"Start"),r=>vC(this.node,r,"End"))))}unmount(){}}class AQ extends mo{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Wc(Gu(this.node.current,"focus",()=>this.onFocus()),Gu(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function gC(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=r[i];o&&ht.postRender(()=>o(t,Hc(t)))}class OQ extends mo{mount(){const{current:t}=this.node;t&&(this.unmount=P9(t,n=>(gC(this.node,n,"Start"),(r,{success:i})=>gC(this.node,r,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const yw=new WeakMap,_v=new WeakMap,PQ=e=>{const t=yw.get(e.target);t&&t(e)},EQ=e=>{e.forEach(PQ)};function TQ({root:e,...t}){const n=e||document;_v.has(n)||_v.set(n,{});const r=_v.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(EQ,{root:e,...t})),r[i]}function CQ(e,t,n){const r=TQ(t);return yw.set(e,n),r.observe(e),()=>{yw.delete(e),r.unobserve(e)}}const kQ={some:0,all:1};class RQ extends mo{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:kQ[i]},l=c=>{const{isIntersecting:f}=c;if(this.isInView===f||(this.isInView=f,o&&!f&&this.hasEnteredView))return;f&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",f);const{onViewportEnter:h,onViewportLeave:p}=this.node.getProps(),y=f?h:p;y&&y(c)};return CQ(this.node.current,s,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(jQ(t,n))&&this.startObserver()}unmount(){}}function jQ({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const MQ={inView:{Feature:RQ},tap:{Feature:OQ},focus:{Feature:AQ},hover:{Feature:_Q}},NQ={layout:{ProjectionNode:Z$,MeasureLayout:V$}},vw={current:null},J$={current:!1};function IQ(){if(J$.current=!0,!!fS)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>vw.current=e.matches;e.addListener(t),t()}else vw.current=!1}const DQ=[...A$,cn,ho],LQ=e=>DQ.find(_$(e)),bC=new WeakMap;function $Q(e,t,n){for(const r in t){const i=t[r],o=n[r];if(pn(i))e.addValue(r,i);else if(pn(o))e.addValue(r,Hu(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(i):s.hasAnimated||s.set(i)}else{const s=e.getStaticValue(r);e.addValue(r,Hu(s!==void 0?s:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const xC=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class BQ{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:o,visualState:s},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=$S,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const g=Ur.now();this.renderScheduledAtthis.bindToMotionValue(r,n)),J$.current||IQ(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:vw.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){bC.delete(this.current),this.projection&&this.projection.unmount(),fo(this.notifyUpdate),fo(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=_a.has(t),i=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&ht.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),o(),s&&s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in js){const n=js[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Pt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Hu(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(w$(i)||d$(i))?i=parseFloat(i):!LQ(i)&&ho.test(n)&&(i=g$(t,n)),this.setBaseTarget(t,pn(i)?i.get():i)),pn(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const s=gS(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);s&&(i=s[t])}if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!pn(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new jS),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class eB extends BQ{constructor(){super(...arguments),this.KeyframeResolver=O$}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;pn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function FQ(e){return window.getComputedStyle(e)}class UQ extends eB{constructor(){super(...arguments),this.type="html",this.renderInstance=FL}readValueFromInstance(t,n){if(_a.has(n)){const r=LS(n);return r&&r.default||0}else{const r=FQ(t),i=(LL(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return q$(t,n)}build(t,n,r){wS(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return OS(t,n,r)}}class qQ extends eB{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Pt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(_a.has(n)){const r=LS(n);return r&&r.default||0}return n=UL.has(n)?n:mS(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return VL(t,n,r)}build(t,n,r){SS(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){qL(t,n,r,i)}mount(t){this.isSVGTag=AS(t.tagName),super.mount(t)}}const zQ=(e,t)=>vS(e)?new qQ(t):new UQ(t,{allowProjection:e!==M.Fragment}),VQ=y9({...hG,...MQ,...SQ,...NQ},zQ),WQ=RK(VQ),HQ={some:0,all:1};function KQ(e,t,{root:n,margin:r,amount:i="some"}={}){const o=ZL(e),s=new WeakMap,l=f=>{f.forEach(h=>{const p=s.get(h.target);if(h.isIntersecting!==!!p)if(h.isIntersecting){const y=t(h);typeof y=="function"?s.set(h.target,y):c.unobserve(h.target)}else typeof p=="function"&&(p(h),s.delete(h.target))})},c=new IntersectionObserver(l,{root:n,rootMargin:r,threshold:typeof i=="number"?i:HQ[i]});return o.forEach(f=>c.observe(f)),()=>c.disconnect()}function GQ(e,{root:t,margin:n,amount:r,once:i=!1}={}){const[o,s]=M.useState(!1);return M.useEffect(()=>{if(!e.current||i&&o)return;const l=()=>(s(!0),i?void 0:()=>s(!1)),c={root:t&&t.current||void 0,margin:n,amount:r};return KQ(e.current,l,c)},[t,e,n,i,r]),o}function ot({children:e,delay:t=0,y:n=40,className:r="",once:i=!0,duration:o=.8}){return E.jsx(WQ.div,{className:r,initial:{opacity:0,y:n},whileInView:{opacity:1,y:0},viewport:{once:i,amount:.15},transition:{duration:o,delay:t,ease:[.25,.46,.45,.94]},children:e})}const QQ="https://media.base44.com/images/public/6a7a7bb337b3bcbc6dafc972/8303ec918_generated_d54f1d26.png",XQ=[{label:"Total Land Bank",value:"2.8M SQM"},{label:"Entitled & Zoned",value:"94%"},{label:"Estimated GDV",value:"QAR 14.2B"},{label:"Geographic Spread",value:"6 Corridors"}];function YQ(){return E.jsxs("section",{id:"top",className:"relative min-h-[720px] max-h-[920px] h-[90vh] w-full overflow-hidden",children:[E.jsx("img",{src:QQ,alt:"Aerial twilight view of strategic land parcels in Qatar's growth corridors",loading:"eager",className:"absolute inset-0 w-full h-full object-cover"}),E.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(180deg, rgba(10,22,40,0.30) 0%, rgba(10,22,40,0.90) 100%)"}}),E.jsx("div",{className:"absolute bottom-0 left-0 right-0 pb-16 md:pb-24 px-5 md:px-20",children:E.jsx("div",{className:"max-w-[1440px] mx-auto",children:E.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-end lg:justify-between gap-10",children:[E.jsxs("div",{className:"max-w-[900px]",children:[E.jsx(ot,{delay:.2,children:E.jsx("p",{className:"text-[12px] font-semibold tracking-[0.18em] text-gold uppercase mb-4",children:"Real Estate — Land Bank"})}),E.jsx(ot,{delay:.4,children:E.jsx("h1",{className:"font-display font-light text-warmwhite text-[38px] md:text-[68px] leading-[1.05] tracking-[-0.02em]",children:"Land Is the Original Asset"})}),E.jsx(ot,{delay:.6,children:E.jsx("p",{className:"text-warmwhite/90 text-lg md:text-xl leading-relaxed max-w-[720px] mt-6",children:"Alrazah Holding maintains a strategically entitled land bank across Qatar's highest-priority growth corridors. Every square meter is zoned, serviced, and positioned for optimal monetization within Qatar National Vision 2030. We do not speculate on land. We engineer its highest and best use."})}),E.jsx(ot,{delay:.8,children:E.jsxs("div",{className:"flex flex-wrap items-center gap-4 mt-10",children:[E.jsx("a",{href:"#portfolio",className:"px-8 py-4 bg-gold text-navy text-sm font-semibold tracking-[0.06em] rounded-sm hover:bg-deepgold hover:-translate-y-0.5 transition-all duration-200 shadow-[0_4px_12px_rgba(197,160,89,0.3)]",children:"Explore the Land Portfolio"}),E.jsxs("button",{className:"inline-flex items-center gap-2 px-8 py-4 border border-warmwhite text-warmwhite text-sm font-semibold tracking-[0.06em] rounded-sm hover:bg-warmwhite hover:text-navy transition-all duration-200",children:[E.jsx(cp,{className:"w-4 h-4"}),"Download Land Bank Prospectus (PDF)"]}),E.jsxs("a",{href:"#partnerships",className:"text-sm text-gold hover:underline underline-offset-4 inline-flex items-center gap-1",children:["Joint Venture Enquiries ",E.jsx(q1,{className:"w-3.5 h-3.5"})]})]})})]}),E.jsx(ot,{delay:1,className:"w-full lg:w-[300px] shrink-0",children:E.jsxs("div",{className:"bg-navy/65 backdrop-blur-md border border-pearl/20 p-7 rounded-sm",children:[E.jsx("p",{className:"text-[11px] font-semibold tracking-[0.14em] text-gold uppercase",children:"Land Bank Summary"}),E.jsx("div",{className:"h-0.5 w-8 bg-gold my-3"}),E.jsx("dl",{className:"space-y-4",children:XQ.map(e=>E.jsxs("div",{className:"flex items-baseline justify-between gap-3 border-b border-pearl/10 pb-3 last:border-0",children:[E.jsx("dt",{className:"text-[13px] text-warmwhite/70",children:e.label}),E.jsx("dd",{className:"font-display font-light text-2xl text-gold text-right",children:e.value})]},e.label))})]})})]})})}),E.jsxs("div",{className:"hidden md:flex absolute bottom-8 right-20 flex-col items-center gap-2",children:[E.jsx("div",{className:"w-px h-12 bg-gold/60 animate-pulse"}),E.jsx("span",{className:"text-[11px] font-semibold tracking-[0.14em] text-gold uppercase",children:"Scroll"})]})]})}const Av=[{label:"Overview",href:"#overview"},{label:"Land Portfolio",href:"#portfolio"},{label:"Growth Corridors",href:"#corridors"},{label:"Entitlements",href:"#entitlements"},{label:"Investment",href:"#investment"},{label:"Investor Data",href:"#investor-data"}];function ZQ(){const[e,t]=M.useState("Overview");return M.useEffect(()=>{const n=()=>{const r=Av.map(o=>document.querySelector(o.href)),i=window.scrollY+200;for(let o=r.length-1;o>=0;o--){const s=r[o];if(s&&s.offsetTop<=i){t(Av[o].label);break}}};return window.addEventListener("scroll",n,{passive:!0}),()=>window.removeEventListener("scroll",n)},[]),E.jsx("div",{className:"sticky top-16 md:top-20 z-[500] bg-sand border-b border-gold/15",children:E.jsx("div",{className:"max-w-[1440px] mx-auto px-5 md:px-20",children:E.jsx("nav",{className:"flex items-center gap-2 overflow-x-auto no-scrollbar py-0",children:Av.map(n=>E.jsx("a",{href:n.href,className:`whitespace-nowrap px-4 py-5 text-[13px] tracking-wide border-b-2 transition-colors ${e===n.label?"text-gold border-gold font-semibold":"text-charcoal border-transparent hover:text-gold"}`,children:n.label},n.label))})})})}var Ov,wC;function jn(){if(wC)return Ov;wC=1;var e=Array.isArray;return Ov=e,Ov}var Pv,SC;function tB(){if(SC)return Pv;SC=1;var e=typeof fd=="object"&&fd&&fd.Object===Object&&fd;return Pv=e,Pv}var Ev,_C;function Kr(){if(_C)return Ev;_C=1;var e=tB(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return Ev=n,Ev}var Tv,AC;function Kc(){if(AC)return Tv;AC=1;var e=Kr(),t=e.Symbol;return Tv=t,Tv}var Cv,OC;function JQ(){if(OC)return Cv;OC=1;var e=Kc(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function o(s){var l=n.call(s,i),c=s[i];try{s[i]=void 0;var f=!0}catch{}var h=r.call(s);return f&&(l?s[i]=c:delete s[i]),h}return Cv=o,Cv}var kv,PC;function eX(){if(PC)return kv;PC=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return kv=n,kv}var Rv,EC;function wi(){if(EC)return Rv;EC=1;var e=Kc(),t=JQ(),n=eX(),r="[object Null]",i="[object Undefined]",o=e?e.toStringTag:void 0;function s(l){return l==null?l===void 0?i:r:o&&o in Object(l)?t(l):n(l)}return Rv=s,Rv}var jv,TC;function Si(){if(TC)return jv;TC=1;function e(t){return t!=null&&typeof t=="object"}return jv=e,jv}var Mv,CC;function ll(){if(CC)return Mv;CC=1;var e=wi(),t=Si(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return Mv=r,Mv}var Nv,kC;function qS(){if(kC)return Nv;kC=1;var e=jn(),t=ll(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(o,s){if(e(o))return!1;var l=typeof o;return l=="number"||l=="symbol"||l=="boolean"||o==null||t(o)?!0:r.test(o)||!n.test(o)||s!=null&&o in Object(s)}return Nv=i,Nv}var Iv,RC;function yo(){if(RC)return Iv;RC=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return Iv=e,Iv}var Dv,jC;function zS(){if(jC)return Dv;jC=1;var e=wi(),t=yo(),n="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",o="[object Proxy]";function s(l){if(!t(l))return!1;var c=e(l);return c==r||c==i||c==n||c==o}return Dv=s,Dv}var Lv,MC;function tX(){if(MC)return Lv;MC=1;var e=Kr(),t=e["__core-js_shared__"];return Lv=t,Lv}var $v,NC;function nX(){if(NC)return $v;NC=1;var e=tX(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return $v=n,$v}var Bv,IC;function nB(){if(IC)return Bv;IC=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return Bv=n,Bv}var Fv,DC;function rX(){if(DC)return Fv;DC=1;var e=zS(),t=nX(),n=yo(),r=nB(),i=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,s=Function.prototype,l=Object.prototype,c=s.toString,f=l.hasOwnProperty,h=RegExp("^"+c.call(f).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function p(y){if(!n(y)||t(y))return!1;var g=e(y)?h:o;return g.test(r(y))}return Fv=p,Fv}var Uv,LC;function iX(){if(LC)return Uv;LC=1;function e(t,n){return t==null?void 0:t[n]}return Uv=e,Uv}var qv,$C;function Aa(){if($C)return qv;$C=1;var e=rX(),t=iX();function n(r,i){var o=t(r,i);return e(o)?o:void 0}return qv=n,qv}var zv,BC;function _p(){if(BC)return zv;BC=1;var e=Aa(),t=e(Object,"create");return zv=t,zv}var Vv,FC;function oX(){if(FC)return Vv;FC=1;var e=_p();function t(){this.__data__=e?e(null):{},this.size=0}return Vv=t,Vv}var Wv,UC;function aX(){if(UC)return Wv;UC=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return Wv=e,Wv}var Hv,qC;function sX(){if(qC)return Hv;qC=1;var e=_p(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function i(o){var s=this.__data__;if(e){var l=s[o];return l===t?void 0:l}return r.call(s,o)?s[o]:void 0}return Hv=i,Hv}var Kv,zC;function lX(){if(zC)return Kv;zC=1;var e=_p(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var o=this.__data__;return e?o[i]!==void 0:n.call(o,i)}return Kv=r,Kv}var Gv,VC;function uX(){if(VC)return Gv;VC=1;var e=_p(),t="__lodash_hash_undefined__";function n(r,i){var o=this.__data__;return this.size+=this.has(r)?0:1,o[r]=e&&i===void 0?t:i,this}return Gv=n,Gv}var Qv,WC;function cX(){if(WC)return Qv;WC=1;var e=oX(),t=aX(),n=sX(),r=lX(),i=uX();function o(s){var l=-1,c=s==null?0:s.length;for(this.clear();++l-1}return tg=t,tg}var ng,ZC;function mX(){if(ZC)return ng;ZC=1;var e=Ap();function t(n,r){var i=this.__data__,o=e(i,n);return o<0?(++this.size,i.push([n,r])):i[o][1]=r,this}return ng=t,ng}var rg,JC;function Op(){if(JC)return rg;JC=1;var e=fX(),t=dX(),n=hX(),r=pX(),i=mX();function o(s){var l=-1,c=s==null?0:s.length;for(this.clear();++l0?1:-1},Ko=function(t){return va(t)&&t.indexOf("%")===t.length-1},de=function(t){return $X(t)&&!cl(t)},BX=function(t){return Ue(t)},$t=function(t){return de(t)||va(t)},FX=0,Gc=function(t){var n=++FX;return"".concat(t||"").concat(n)},ga=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!de(t)&&!va(t))return r;var o;if(Ko(t)){var s=t.indexOf("%");o=n*parseFloat(t.slice(0,s))/100}else o=+t;return cl(o)&&(o=r),i&&o>n&&(o=n),o},Qi=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},UX=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function GX(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function bw(e){"@babel/helpers - typeof";return bw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bw(e)}var Ek={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},hi=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},Tk=null,Cg=null,XS=function e(t){if(t===Tk&&Array.isArray(Cg))return Cg;var n=[];return M.Children.forEach(t,function(r){Ue(r)||(NX.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),Cg=n,Tk=t,n};function Or(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return hi(i)}):r=[hi(t)],XS(e).forEach(function(i){var o=sr(i,"type.displayName")||sr(i,"type.name");r.indexOf(o)!==-1&&n.push(i)}),n}function Bn(e,t){var n=Or(e,t);return n&&n[0]}var Ck=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!de(r)||r<=0||!de(i)||i<=0)},QX=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],XX=function(t){return t&&t.type&&va(t.type)&&QX.indexOf(t.type)>=0},YX=function(t){return t&&bw(t)==="object"&&"clipDot"in t},ZX=function(t,n,r,i){var o,s=(o=Tg==null?void 0:Tg[i])!==null&&o!==void 0?o:[];return n.startsWith("data-")||!Le(t)&&(i&&s.includes(n)||VX.includes(n))||r&&QS.includes(n)},Fe=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(M.isValidElement(t)&&(i=t.props),!ul(i))return null;var o={};return Object.keys(i).forEach(function(s){var l;ZX((l=i)===null||l===void 0?void 0:l[s],s,n,r)&&(o[s]=i[s])}),o},xw=function e(t,n){if(t===n)return!0;var r=M.Children.count(t);if(r!==M.Children.count(n))return!1;if(r===0)return!0;if(r===1)return kk(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rY(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Sw(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,o=e.className,s=e.style,l=e.title,c=e.desc,f=nY(e,tY),h=i||{width:n,height:r,x:0,y:0},p=We("recharts-surface",o);return z.createElement("svg",ww({},Fe(f,!0,"svg"),{className:p,width:n,height:r,style:s,viewBox:"".concat(h.x," ").concat(h.y," ").concat(h.width," ").concat(h.height)}),z.createElement("title",null,l),z.createElement("desc",null,c),t)}var iY=["children","className"];function _w(){return _w=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function aY(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var bt=z.forwardRef(function(e,t){var n=e.children,r=e.className,i=oY(e,iY),o=We("recharts-layer",r);return z.createElement("g",_w({className:o},Fe(i,!0),{ref:t}),n)}),pi=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;oo?0:o+n),r=r>o?o:r,r<0&&(r+=o),o=n>r?0:r-n>>>0,n>>>=0;for(var s=Array(o);++i=o?n:e(n,r,i)}return Rg=t,Rg}var jg,Nk;function lB(){if(Nk)return jg;Nk=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,o="\\ufe0e\\ufe0f",s="\\u200d",l=RegExp("["+s+e+i+o+"]");function c(f){return l.test(f)}return jg=c,jg}var Mg,Ik;function uY(){if(Ik)return Mg;Ik=1;function e(t){return t.split("")}return Mg=e,Mg}var Ng,Dk;function cY(){if(Dk)return Ng;Dk=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,o="\\ufe0e\\ufe0f",s="["+e+"]",l="["+i+"]",c="\\ud83c[\\udffb-\\udfff]",f="(?:"+l+"|"+c+")",h="[^"+e+"]",p="(?:\\ud83c[\\udde6-\\uddff]){2}",y="[\\ud800-\\udbff][\\udc00-\\udfff]",g="\\u200d",S=f+"?",b="["+o+"]?",v="(?:"+g+"(?:"+[h,p,y].join("|")+")"+b+S+")*",w=b+S+v,A="(?:"+[h+l+"?",l,p,y,s].join("|")+")",O=RegExp(c+"(?="+c+")|"+A+w,"g");function T(P){return P.match(O)||[]}return Ng=T,Ng}var Ig,Lk;function fY(){if(Lk)return Ig;Lk=1;var e=uY(),t=lB(),n=cY();function r(i){return t(i)?n(i):e(i)}return Ig=r,Ig}var Dg,$k;function dY(){if($k)return Dg;$k=1;var e=lY(),t=lB(),n=fY(),r=iB();function i(o){return function(s){s=r(s);var l=t(s)?n(s):void 0,c=l?l[0]:s.charAt(0),f=l?e(l,1).join(""):s.slice(1);return c[o]()+f}}return Dg=i,Dg}var Lg,Bk;function hY(){if(Bk)return Lg;Bk=1;var e=dY(),t=e("toUpperCase");return Lg=t,Lg}var pY=hY();const Tp=rt(pY);function ut(e){return function(){return e}}const uB=Math.cos,ph=Math.sin,Er=Math.sqrt,mh=Math.PI,Cp=2*mh,Aw=Math.PI,Ow=2*Aw,qo=1e-6,mY=Ow-qo;function cB(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return cB;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;iqo)if(!(Math.abs(p*c-f*h)>qo)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let g=r-s,S=i-l,b=c*c+f*f,v=g*g+S*S,w=Math.sqrt(b),A=Math.sqrt(y),O=o*Math.tan((Aw-Math.acos((b+y-v)/(2*w*A)))/2),T=O/A,P=O/w;Math.abs(T-1)>qo&&this._append`L${t+T*h},${n+T*p}`,this._append`A${o},${o},0,0,${+(p*g>h*S)},${this._x1=t+P*c},${this._y1=n+P*f}`}}arc(t,n,r,i,o,s){if(t=+t,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let l=r*Math.cos(i),c=r*Math.sin(i),f=t+l,h=n+c,p=1^s,y=s?i-o:o-i;this._x1===null?this._append`M${f},${h}`:(Math.abs(this._x1-f)>qo||Math.abs(this._y1-h)>qo)&&this._append`L${f},${h}`,r&&(y<0&&(y=y%Ow+Ow),y>mY?this._append`A${r},${r},0,1,${p},${t-l},${n-c}A${r},${r},0,1,${p},${this._x1=f},${this._y1=h}`:y>qo&&this._append`A${r},${r},0,${+(y>=Aw)},${p},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function YS(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new vY(t)}function ZS(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function fB(e){this._context=e}fB.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function kp(e){return new fB(e)}function dB(e){return e[0]}function hB(e){return e[1]}function pB(e,t){var n=ut(!0),r=null,i=kp,o=null,s=YS(l);e=typeof e=="function"?e:e===void 0?dB:ut(e),t=typeof t=="function"?t:t===void 0?hB:ut(t);function l(c){var f,h=(c=ZS(c)).length,p,y=!1,g;for(r==null&&(o=i(g=s())),f=0;f<=h;++f)!(f=g;--S)l.point(O[S],T[S]);l.lineEnd(),l.areaEnd()}w&&(O[y]=+e(v,y,p),T[y]=+t(v,y,p),l.point(r?+r(v,y,p):O[y],n?+n(v,y,p):T[y]))}if(A)return l=null,A+""||null}function h(){return pB().defined(i).curve(s).context(o)}return f.x=function(p){return arguments.length?(e=typeof p=="function"?p:ut(+p),r=null,f):e},f.x0=function(p){return arguments.length?(e=typeof p=="function"?p:ut(+p),f):e},f.x1=function(p){return arguments.length?(r=p==null?null:typeof p=="function"?p:ut(+p),f):r},f.y=function(p){return arguments.length?(t=typeof p=="function"?p:ut(+p),n=null,f):t},f.y0=function(p){return arguments.length?(t=typeof p=="function"?p:ut(+p),f):t},f.y1=function(p){return arguments.length?(n=p==null?null:typeof p=="function"?p:ut(+p),f):n},f.lineX0=f.lineY0=function(){return h().x(e).y(t)},f.lineY1=function(){return h().x(e).y(n)},f.lineX1=function(){return h().x(r).y(t)},f.defined=function(p){return arguments.length?(i=typeof p=="function"?p:ut(!!p),f):i},f.curve=function(p){return arguments.length?(s=p,o!=null&&(l=s(o)),f):s},f.context=function(p){return arguments.length?(p==null?o=l=null:l=s(o=p),f):o},f}class mB{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function gY(e){return new mB(e,!0)}function bY(e){return new mB(e,!1)}const JS={draw(e,t){const n=Er(t/mh);e.moveTo(n,0),e.arc(0,0,n,0,Cp)}},xY={draw(e,t){const n=Er(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},yB=Er(1/3),wY=yB*2,SY={draw(e,t){const n=Er(t/wY),r=n*yB;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},_Y={draw(e,t){const n=Er(t),r=-n/2;e.rect(r,r,n,n)}},AY=.8908130915292852,vB=ph(mh/10)/ph(7*mh/10),OY=ph(Cp/10)*vB,PY=-uB(Cp/10)*vB,EY={draw(e,t){const n=Er(t*AY),r=OY*n,i=PY*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const s=Cp*o/5,l=uB(s),c=ph(s);e.lineTo(c*n,-l*n),e.lineTo(l*r-c*i,c*r+l*i)}e.closePath()}},$g=Er(3),TY={draw(e,t){const n=-Er(t/($g*3));e.moveTo(0,n*2),e.lineTo(-$g*n,-n),e.lineTo($g*n,-n),e.closePath()}},Zn=-.5,Jn=Er(3)/2,Pw=1/Er(12),CY=(Pw/2+1)*3,kY={draw(e,t){const n=Er(t/CY),r=n/2,i=n*Pw,o=r,s=n*Pw+n,l=-o,c=s;e.moveTo(r,i),e.lineTo(o,s),e.lineTo(l,c),e.lineTo(Zn*r-Jn*i,Jn*r+Zn*i),e.lineTo(Zn*o-Jn*s,Jn*o+Zn*s),e.lineTo(Zn*l-Jn*c,Jn*l+Zn*c),e.lineTo(Zn*r+Jn*i,Zn*i-Jn*r),e.lineTo(Zn*o+Jn*s,Zn*s-Jn*o),e.lineTo(Zn*l+Jn*c,Zn*c-Jn*l),e.closePath()}};function RY(e,t){let n=null,r=YS(i);e=typeof e=="function"?e:ut(e||JS),t=typeof t=="function"?t:ut(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:ut(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:ut(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function yh(){}function vh(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function gB(e){this._context=e}gB.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:vh(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:vh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function jY(e){return new gB(e)}function bB(e){this._context=e}bB.prototype={areaStart:yh,areaEnd:yh,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:vh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function MY(e){return new bB(e)}function xB(e){this._context=e}xB.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:vh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function NY(e){return new xB(e)}function wB(e){this._context=e}wB.prototype={areaStart:yh,areaEnd:yh,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function IY(e){return new wB(e)}function Fk(e){return e<0?-1:1}function Uk(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),s=(n-e._y1)/(i||r<0&&-0),l=(o*i+s*r)/(r+i);return(Fk(o)+Fk(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(l))||0}function qk(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Bg(e,t,n){var r=e._x0,i=e._y0,o=e._x1,s=e._y1,l=(o-r)/3;e._context.bezierCurveTo(r+l,i+l*t,o-l,s-l*n,o,s)}function gh(e){this._context=e}gh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Bg(this,this._t0,qk(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Bg(this,qk(this,n=Uk(this,e,t)),n);break;default:Bg(this,this._t0,n=Uk(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function SB(e){this._context=new _B(e)}(SB.prototype=Object.create(gh.prototype)).point=function(e,t){gh.prototype.point.call(this,t,e)};function _B(e){this._context=e}_B.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function DY(e){return new gh(e)}function LY(e){return new SB(e)}function AB(e){this._context=e}AB.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=zk(e),i=zk(t),o=0,s=1;s=0;--t)i[t]=(s[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function BY(e){return new Rp(e,.5)}function FY(e){return new Rp(e,0)}function UY(e){return new Rp(e,1)}function Ns(e,t){if((s=e.length)>1)for(var n=1,r,i,o=e[t[0]],s,l=o.length;n=0;)n[t]=t;return n}function qY(e,t){return e[t]}function zY(e){const t=[];return t.key=e,t}function VY(){var e=ut([]),t=Ew,n=Ns,r=qY;function i(o){var s=Array.from(e.apply(this,arguments),zY),l,c=s.length,f=-1,h;for(const p of o)for(l=0,++f;l0){for(var n,r,i=0,o=e[0].length,s;i0){for(var n=0,r=e[t[0]],i,o=r.length;n0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,s;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function JY(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var OB={symbolCircle:JS,symbolCross:xY,symbolDiamond:SY,symbolSquare:_Y,symbolStar:EY,symbolTriangle:TY,symbolWye:kY},eZ=Math.PI/180,tZ=function(t){var n="symbol".concat(Tp(t));return OB[n]||JS},nZ=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*eZ;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},rZ=function(t,n){OB["symbol".concat(Tp(t))]=n},e_=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,o=i===void 0?64:i,s=t.sizeType,l=s===void 0?"area":s,c=ZY(t,GY),f=Wk(Wk({},c),{},{type:r,size:o,sizeType:l}),h=function(){var v=tZ(r),w=RY().type(v).size(nZ(o,l,r));return w()},p=f.className,y=f.cx,g=f.cy,S=Fe(f,!0);return y===+y&&g===+g&&o===+o?z.createElement("path",Tw({},S,{className:We("recharts-symbols",p),transform:"translate(".concat(y,", ").concat(g,")"),d:h()})):null};e_.registerSymbol=rZ;function Is(e){"@babel/helpers - typeof";return Is=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Is(e)}function Cw(){return Cw=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var A=g.inactive?f:g.color;return z.createElement("li",Cw({className:v,style:p,key:"legend-item-".concat(S)},hh(r.props,g,S)),z.createElement(Sw,{width:s,height:s,viewBox:h,style:y},r.renderIcon(g)),z.createElement("span",{className:"recharts-legend-item-text",style:{color:A}},b?b(w,g,S):w))})}},{key:"render",value:function(){var r=this.props,i=r.payload,o=r.layout,s=r.align;if(!i||!i.length)return null;var l={padding:0,margin:0,textAlign:o==="horizontal"?s:"left"};return z.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])})(M.PureComponent);Xu(t_,"displayName","Legend");Xu(t_,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var Fg,Kk;function hZ(){if(Kk)return Fg;Kk=1;var e=Op();function t(){this.__data__=new e,this.size=0}return Fg=t,Fg}var Ug,Gk;function pZ(){if(Gk)return Ug;Gk=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return Ug=e,Ug}var qg,Qk;function mZ(){if(Qk)return qg;Qk=1;function e(t){return this.__data__.get(t)}return qg=e,qg}var zg,Xk;function yZ(){if(Xk)return zg;Xk=1;function e(t){return this.__data__.has(t)}return zg=e,zg}var Vg,Yk;function vZ(){if(Yk)return Vg;Yk=1;var e=Op(),t=WS(),n=HS(),r=200;function i(o,s){var l=this.__data__;if(l instanceof e){var c=l.__data__;if(!t||c.lengthg))return!1;var b=p.get(s),v=p.get(l);if(b&&v)return b==l&&v==s;var w=-1,A=!0,O=c&i?new e:void 0;for(p.set(s,l),p.set(l,s);++w-1&&r%1==0&&r-1&&n%1==0&&n<=e}return d0=t,d0}var h0,wR;function kZ(){if(wR)return h0;wR=1;var e=wi(),t=o_(),n=Si(),r="[object Arguments]",i="[object Array]",o="[object Boolean]",s="[object Date]",l="[object Error]",c="[object Function]",f="[object Map]",h="[object Number]",p="[object Object]",y="[object RegExp]",g="[object Set]",S="[object String]",b="[object WeakMap]",v="[object ArrayBuffer]",w="[object DataView]",A="[object Float32Array]",O="[object Float64Array]",T="[object Int8Array]",P="[object Int16Array]",C="[object Int32Array]",k="[object Uint8Array]",j="[object Uint8ClampedArray]",N="[object Uint16Array]",U="[object Uint32Array]",L={};L[A]=L[O]=L[T]=L[P]=L[C]=L[k]=L[j]=L[N]=L[U]=!0,L[r]=L[i]=L[v]=L[o]=L[w]=L[s]=L[l]=L[c]=L[f]=L[h]=L[p]=L[y]=L[g]=L[S]=L[b]=!1;function $(G){return n(G)&&t(G.length)&&!!L[e(G)]}return h0=$,h0}var p0,SR;function IB(){if(SR)return p0;SR=1;function e(t){return function(n){return t(n)}}return p0=e,p0}var Eu={exports:{}};Eu.exports;var _R;function RZ(){return _R||(_R=1,(function(e,t){var n=tB(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,s=o&&n.process,l=(function(){try{var c=i&&i.require&&i.require("util").types;return c||s&&s.binding&&s.binding("util")}catch{}})();e.exports=l})(Eu,Eu.exports)),Eu.exports}var m0,AR;function DB(){if(AR)return m0;AR=1;var e=kZ(),t=IB(),n=RZ(),r=n&&n.isTypedArray,i=r?t(r):e;return m0=i,m0}var y0,OR;function jZ(){if(OR)return y0;OR=1;var e=EZ(),t=r_(),n=jn(),r=NB(),i=i_(),o=DB(),s=Object.prototype,l=s.hasOwnProperty;function c(f,h){var p=n(f),y=!p&&t(f),g=!p&&!y&&r(f),S=!p&&!y&&!g&&o(f),b=p||y||g||S,v=b?e(f.length,String):[],w=v.length;for(var A in f)(h||l.call(f,A))&&!(b&&(A=="length"||g&&(A=="offset"||A=="parent")||S&&(A=="buffer"||A=="byteLength"||A=="byteOffset")||i(A,w)))&&v.push(A);return v}return y0=c,y0}var v0,PR;function MZ(){if(PR)return v0;PR=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return v0=t,v0}var g0,ER;function LB(){if(ER)return g0;ER=1;function e(t,n){return function(r){return t(n(r))}}return g0=e,g0}var b0,TR;function NZ(){if(TR)return b0;TR=1;var e=LB(),t=e(Object.keys,Object);return b0=t,b0}var x0,CR;function IZ(){if(CR)return x0;CR=1;var e=MZ(),t=NZ(),n=Object.prototype,r=n.hasOwnProperty;function i(o){if(!e(o))return t(o);var s=[];for(var l in Object(o))r.call(o,l)&&l!="constructor"&&s.push(l);return s}return x0=i,x0}var w0,kR;function Qc(){if(kR)return w0;kR=1;var e=zS(),t=o_();function n(r){return r!=null&&t(r.length)&&!e(r)}return w0=n,w0}var S0,RR;function jp(){if(RR)return S0;RR=1;var e=jZ(),t=IZ(),n=Qc();function r(i){return n(i)?e(i):t(i)}return S0=r,S0}var _0,jR;function DZ(){if(jR)return _0;jR=1;var e=_Z(),t=PZ(),n=jp();function r(i){return e(i,n,t)}return _0=r,_0}var A0,MR;function LZ(){if(MR)return A0;MR=1;var e=DZ(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(o,s,l,c,f,h){var p=l&t,y=e(o),g=y.length,S=e(s),b=S.length;if(g!=b&&!p)return!1;for(var v=g;v--;){var w=y[v];if(!(p?w in s:r.call(s,w)))return!1}var A=h.get(o),O=h.get(s);if(A&&O)return A==s&&O==o;var T=!0;h.set(o,s),h.set(s,o);for(var P=p;++v-1}return X0=t,X0}var Y0,aj;function rJ(){if(aj)return Y0;aj=1;function e(t,n,r){for(var i=-1,o=t==null?0:t.length;++i=s){var w=f?null:i(c);if(w)return o(w);S=!1,y=r,v=new e}else v=f?[]:b;e:for(;++p=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function gJ(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function bJ(e){return e.value}function xJ(e,t){if(z.isValidElement(e))return z.cloneElement(e,t);if(typeof e=="function")return z.createElement(e,t);t.ref;var n=vJ(t,uJ);return z.createElement(t_,n)}var pj=1,ps=(function(e){function t(){var n;cJ(this,t);for(var r=arguments.length,i=new Array(r),o=0;opj||Math.abs(i.height-this.lastBoundingBox.height)>pj)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?ri({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,o=i.layout,s=i.align,l=i.verticalAlign,c=i.margin,f=i.chartWidth,h=i.chartHeight,p,y;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(s==="center"&&o==="vertical"){var g=this.getBBoxSnapshot();p={left:((f||0)-g.width)/2}}else p=s==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(l==="middle"){var S=this.getBBoxSnapshot();y={top:((h||0)-S.height)/2}}else y=l==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return ri(ri({},p),y)}},{key:"render",value:function(){var r=this,i=this.props,o=i.content,s=i.width,l=i.height,c=i.wrapperStyle,f=i.payloadUniqBy,h=i.payload,p=ri(ri({position:"absolute",width:s||"auto",height:l||"auto"},this.getDefaultPosition(c)),c);return z.createElement("div",{className:"recharts-legend-wrapper",style:p,ref:function(g){r.wrapperNode=g}},xJ(o,ri(ri({},this.props),{},{payload:qB(h,f,bJ)})))}}],[{key:"getWithHeight",value:function(r,i){var o=ri(ri({},this.defaultProps),r.props),s=o.layout;return s==="vertical"&&de(r.props.height)?{height:r.props.height}:s==="horizontal"?{width:r.props.width||i}:null}}])})(M.PureComponent);Mp(ps,"displayName","Legend");Mp(ps,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var nb,mj;function wJ(){if(mj)return nb;mj=1;var e=Kc(),t=r_(),n=jn(),r=e?e.isConcatSpreadable:void 0;function i(o){return n(o)||t(o)||!!(r&&o&&o[r])}return nb=i,nb}var rb,yj;function WB(){if(yj)return rb;yj=1;var e=MB(),t=wJ();function n(r,i,o,s,l){var c=-1,f=r.length;for(o||(o=t),l||(l=[]);++c0&&o(h)?i>1?n(h,i-1,o,s,l):e(l,h):s||(l[l.length]=h)}return l}return rb=n,rb}var ib,vj;function SJ(){if(vj)return ib;vj=1;function e(t){return function(n,r,i){for(var o=-1,s=Object(n),l=i(n),c=l.length;c--;){var f=l[t?c:++o];if(r(s[f],f,s)===!1)break}return n}}return ib=e,ib}var ob,gj;function _J(){if(gj)return ob;gj=1;var e=SJ(),t=e();return ob=t,ob}var ab,bj;function HB(){if(bj)return ab;bj=1;var e=_J(),t=jp();function n(r,i){return r&&e(r,i,t)}return ab=n,ab}var sb,xj;function AJ(){if(xj)return sb;xj=1;var e=Qc();function t(n,r){return function(i,o){if(i==null)return i;if(!e(i))return n(i,o);for(var s=i.length,l=r?s:-1,c=Object(i);(r?l--:++lr||l&&c&&h&&!f&&!p||o&&c&&h||!i&&h||!s)return 1;if(!o&&!l&&!p&&n=f)return h;var p=i[o];return h*(p=="desc"?-1:1)}}return n.index-r.index}return db=t,db}var hb,Pj;function TJ(){if(Pj)return hb;Pj=1;var e=KS(),t=GS(),n=vo(),r=KB(),i=OJ(),o=IB(),s=EJ(),l=fl(),c=jn();function f(h,p,y){p.length?p=e(p,function(b){return c(b)?function(v){return t(v,b.length===1?b[0]:b)}:b}):p=[l];var g=-1;p=e(p,o(n));var S=r(h,function(b,v,w){var A=e(p,function(O){return O(b)});return{criteria:A,index:++g,value:b}});return i(S,function(b,v){return s(b,v,y)})}return hb=f,hb}var pb,Ej;function CJ(){if(Ej)return pb;Ej=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return pb=e,pb}var mb,Tj;function kJ(){if(Tj)return mb;Tj=1;var e=CJ(),t=Math.max;function n(r,i,o){return i=t(i===void 0?r.length-1:i,0),function(){for(var s=arguments,l=-1,c=t(s.length-i,0),f=Array(c);++l0){if(++o>=e)return arguments[0]}else o=0;return i.apply(void 0,arguments)}}return bb=r,bb}var xb,Mj;function NJ(){if(Mj)return xb;Mj=1;var e=jJ(),t=MJ(),n=t(e);return xb=n,xb}var wb,Nj;function IJ(){if(Nj)return wb;Nj=1;var e=fl(),t=kJ(),n=NJ();function r(i,o){return n(t(i,o,e),i+"")}return wb=r,wb}var Sb,Ij;function Np(){if(Ij)return Sb;Ij=1;var e=VS(),t=Qc(),n=i_(),r=yo();function i(o,s,l){if(!r(l))return!1;var c=typeof s;return(c=="number"?t(l)&&n(s,l.length):c=="string"&&s in l)?e(l[s],o):!1}return Sb=i,Sb}var _b,Dj;function DJ(){if(Dj)return _b;Dj=1;var e=WB(),t=TJ(),n=IJ(),r=Np(),i=n(function(o,s){if(o==null)return[];var l=s.length;return l>1&&r(o,s[0],s[1])?s=[]:l>2&&r(s[0],s[1],s[2])&&(s=[s[0]]),t(o,e(s,1),[])});return _b=i,_b}var LJ=DJ();const l_=rt(LJ);function Yu(e){"@babel/helpers - typeof";return Yu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yu(e)}function jw(){return jw=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t.x),"".concat(uu,"-left"),de(n)&&t&&de(t.x)&&n=t.y),"".concat(uu,"-top"),de(r)&&t&&de(t.y)&&rb?Math.max(h,c[r]):Math.max(p,c[r])}function ZJ(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function JJ(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,o=e.reverseDirection,s=e.tooltipBox,l=e.useTranslate3d,c=e.viewBox,f,h,p;return s.height>0&&s.width>0&&n?(h=Bj({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:s.width,viewBox:c,viewBoxDimension:c.width}),p=Bj({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:s.height,viewBox:c,viewBoxDimension:c.height}),f=ZJ({translateX:h,translateY:p,useTranslate3d:l})):f=XJ,{cssProperties:f,cssClasses:YJ({translateX:h,translateY:p,coordinate:n})}}function Ls(e){"@babel/helpers - typeof";return Ls=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ls(e)}function Fj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Uj(e){for(var t=1;tqj||Math.abs(r.height-this.state.lastBoundingBox.height)>qj)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,o=i.active,s=i.allowEscapeViewBox,l=i.animationDuration,c=i.animationEasing,f=i.children,h=i.coordinate,p=i.hasPayload,y=i.isAnimationActive,g=i.offset,S=i.position,b=i.reverseDirection,v=i.useTranslate3d,w=i.viewBox,A=i.wrapperStyle,O=JJ({allowEscapeViewBox:s,coordinate:h,offsetTopLeft:g,position:S,reverseDirection:b,tooltipBox:this.state.lastBoundingBox,useTranslate3d:v,viewBox:w}),T=O.cssClasses,P=O.cssProperties,C=Uj(Uj({transition:y&&o?"transform ".concat(l,"ms ").concat(c):void 0},P),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&p?"visible":"hidden",position:"absolute",top:0,left:0},A);return z.createElement("div",{tabIndex:-1,className:T,style:C,ref:function(j){r.wrapperNode=j}},f)}}])})(M.PureComponent),uee=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},dl={isSsr:uee()};function $s(e){"@babel/helpers - typeof";return $s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$s(e)}function zj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Vj(e){for(var t=1;t0;return z.createElement(lee,{allowEscapeViewBox:s,animationDuration:l,animationEasing:c,isAnimationActive:y,active:o,coordinate:h,hasPayload:C,offset:g,position:v,reverseDirection:w,useTranslate3d:A,viewBox:O,wrapperStyle:T},bee(f,Vj(Vj({},this.props),{},{payload:P})))}}])})(M.PureComponent);u_(Mr,"displayName","Tooltip");u_(Mr,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!dl.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var Ob,Wj;function xee(){if(Wj)return Ob;Wj=1;var e=Kr(),t=function(){return e.Date.now()};return Ob=t,Ob}var Pb,Hj;function wee(){if(Hj)return Pb;Hj=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return Pb=t,Pb}var Eb,Kj;function See(){if(Kj)return Eb;Kj=1;var e=wee(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return Eb=n,Eb}var Tb,Gj;function JB(){if(Gj)return Tb;Gj=1;var e=See(),t=yo(),n=ll(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,s=/^0o[0-7]+$/i,l=parseInt;function c(f){if(typeof f=="number")return f;if(n(f))return r;if(t(f)){var h=typeof f.valueOf=="function"?f.valueOf():f;f=t(h)?h+"":h}if(typeof f!="string")return f===0?f:+f;f=e(f);var p=o.test(f);return p||s.test(f)?l(f.slice(2),p?2:8):i.test(f)?r:+f}return Tb=c,Tb}var Cb,Qj;function _ee(){if(Qj)return Cb;Qj=1;var e=yo(),t=xee(),n=JB(),r="Expected a function",i=Math.max,o=Math.min;function s(l,c,f){var h,p,y,g,S,b,v=0,w=!1,A=!1,O=!0;if(typeof l!="function")throw new TypeError(r);c=n(c)||0,e(f)&&(w=!!f.leading,A="maxWait"in f,y=A?i(n(f.maxWait)||0,c):y,O="trailing"in f?!!f.trailing:O);function T(G){var F=h,X=p;return h=p=void 0,v=G,g=l.apply(X,F),g}function P(G){return v=G,S=setTimeout(j,c),w?T(G):g}function C(G){var F=G-b,X=G-v,J=c-F;return A?o(J,y-X):J}function k(G){var F=G-b,X=G-v;return b===void 0||F>=c||F<0||A&&X>=y}function j(){var G=t();if(k(G))return N(G);S=setTimeout(j,C(G))}function N(G){return S=void 0,O&&h?T(G):(h=p=void 0,g)}function U(){S!==void 0&&clearTimeout(S),v=0,h=b=p=S=void 0}function L(){return S===void 0?g:N(t())}function $(){var G=t(),F=k(G);if(h=arguments,p=this,b=G,F){if(S===void 0)return P(b);if(A)return clearTimeout(S),S=setTimeout(j,c),T(b)}return S===void 0&&(S=setTimeout(j,c)),g}return $.cancel=U,$.flush=L,$}return Cb=s,Cb}var kb,Xj;function Aee(){if(Xj)return kb;Xj=1;var e=_ee(),t=yo(),n="Expected a function";function r(i,o,s){var l=!0,c=!0;if(typeof i!="function")throw new TypeError(n);return t(s)&&(l="leading"in s?!!s.leading:l,c="trailing"in s?!!s.trailing:c),e(i,o,{leading:l,maxWait:o,trailing:c})}return kb=r,kb}var Oee=Aee();const eF=rt(Oee);function Ju(e){"@babel/helpers - typeof";return Ju=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ju(e)}function Yj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ed(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(G=eF(G,b,{trailing:!0,leading:!1}));var F=new ResizeObserver(G),X=P.current.getBoundingClientRect(),J=X.width,ee=X.height;return L(J,ee),F.observe(P.current),function(){F.disconnect()}},[L,b]);var $=M.useMemo(function(){var G=N.containerWidth,F=N.containerHeight;if(G<0||F<0)return null;pi(Ko(s)||Ko(c),`The width(%s) and height(%s) are both fixed numbers, maybe you don't need to use a ResponsiveContainer.`,s,c),pi(!n||n>0,"The aspect(%s) must be greater than zero.",n);var X=Ko(s)?G:s,J=Ko(c)?F:c;n&&n>0&&(X?J=X/n:J&&(X=J*n),y&&J>y&&(J=y)),pi(X>0||J>0,`The width(%s) and height(%s) of chart should be greater than 0, please check the style of container, or the props width(%s) and height(%s), or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the height and width.`,X,J,s,c,h,p,n);var ee=!Array.isArray(g)&&hi(g.type).endsWith("Chart");return z.Children.map(g,function(Q){return z.isValidElement(Q)?M.cloneElement(Q,Ed({width:X,height:J},ee?{style:Ed({height:"100%",width:"100%",maxHeight:J,maxWidth:X},Q.props.style)}:{})):Q})},[n,g,c,y,p,h,N,s]);return z.createElement("div",{id:v?"".concat(v):void 0,className:We("recharts-responsive-container",w),style:Ed(Ed({},T),{},{width:s,height:c,minWidth:h,minHeight:p,maxHeight:y}),ref:P},$)}),tF=function(t){return null};tF.displayName="Cell";function ec(e){"@babel/helpers - typeof";return ec=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ec(e)}function Jj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Dw(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||dl.isSsr)return{width:0,height:0};var r=Fee(n),i=JSON.stringify({text:t,copyStyle:r});if(ts.widthCache[i])return ts.widthCache[i];try{var o=document.getElementById(eM);o||(o=document.createElement("span"),o.setAttribute("id",eM),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var s=Dw(Dw({},Bee),r);Object.assign(o.style,s),o.textContent="".concat(t);var l=o.getBoundingClientRect(),c={width:l.width,height:l.height};return ts.widthCache[i]=c,++ts.cacheCount>$ee&&(ts.cacheCount=0,ts.widthCache={}),c}catch{return{width:0,height:0}}},Uee=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function tc(e){"@babel/helpers - typeof";return tc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tc(e)}function _h(e,t){return Wee(e)||Vee(e,t)||zee(e,t)||qee()}function qee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zee(e,t){if(e){if(typeof e=="string")return tM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tM(e,t)}}function tM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ote(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function sM(e,t){return ute(e)||lte(e,t)||ste(e,t)||ate()}function ate(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ste(e,t){if(e){if(typeof e=="string")return lM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lM(e,t)}}function lM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[];return X.reduce(function(J,ee){var Q=ee.word,ne=ee.width,V=J[J.length-1];if(V&&(i==null||o||V.width+ne+ree.width?J:ee})};if(!h)return g;for(var b="…",v=function(X){var J=p.slice(0,X),ee=oF({breakAll:f,style:c,children:J+b}).wordsWithComputedWidth,Q=y(ee),ne=Q.length>s||S(Q).width>Number(i);return[ne,Q]},w=0,A=p.length-1,O=0,T;w<=A&&O<=p.length-1;){var P=Math.floor((w+A)/2),C=P-1,k=v(C),j=sM(k,2),N=j[0],U=j[1],L=v(P),$=sM(L,1),G=$[0];if(!N&&!G&&(w=P+1),N&&G&&(A=P-1),!N&&G){T=U;break}O++}return T||g},uM=function(t){var n=Ue(t)?[]:t.toString().split(iF);return[{words:n}]},fte=function(t){var n=t.width,r=t.scaleToFit,i=t.children,o=t.style,s=t.breakAll,l=t.maxLines;if((n||r)&&!dl.isSsr){var c,f,h=oF({breakAll:s,children:i,style:o});if(h){var p=h.wordsWithComputedWidth,y=h.spaceWidth;c=p,f=y}else return uM(i);return cte({breakAll:s,children:i,maxLines:l,style:o},c,f,n,r)}return uM(i)},cM="#808080",Ah=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,s=t.lineHeight,l=s===void 0?"1em":s,c=t.capHeight,f=c===void 0?"0.71em":c,h=t.scaleToFit,p=h===void 0?!1:h,y=t.textAnchor,g=y===void 0?"start":y,S=t.verticalAnchor,b=S===void 0?"end":S,v=t.fill,w=v===void 0?cM:v,A=aM(t,rte),O=M.useMemo(function(){return fte({breakAll:A.breakAll,children:A.children,maxLines:A.maxLines,scaleToFit:p,style:A.style,width:A.width})},[A.breakAll,A.children,A.maxLines,p,A.style,A.width]),T=A.dx,P=A.dy,C=A.angle,k=A.className,j=A.breakAll,N=aM(A,ite);if(!$t(r)||!$t(o))return null;var U=r+(de(T)?T:0),L=o+(de(P)?P:0),$;switch(b){case"start":$=Rb("calc(".concat(f,")"));break;case"middle":$=Rb("calc(".concat((O.length-1)/2," * -").concat(l," + (").concat(f," / 2))"));break;default:$=Rb("calc(".concat(O.length-1," * -").concat(l,")"));break}var G=[];if(p){var F=O[0].width,X=A.width;G.push("scale(".concat((de(X)?X/F:1)/F,")"))}return C&&G.push("rotate(".concat(C,", ").concat(U,", ").concat(L,")")),G.length&&(N.transform=G.join(" ")),z.createElement("text",Lw({},Fe(N,!0),{x:U,y:L,className:We("recharts-text",k),textAnchor:g,fill:w.includes("url")?cM:w}),O.map(function(J,ee){var Q=J.words.join(j?"":" ");return z.createElement("tspan",{x:U,dy:ee===0?$:l,key:"".concat(Q,"-").concat(ee)},Q)}))};function uo(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function dte(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function c_(e){let t,n,r;e.length!==2?(t=uo,n=(l,c)=>uo(e(l),c),r=(l,c)=>e(l)-c):(t=e===uo||e===dte?e:hte,n=e,r=e);function i(l,c,f=0,h=l.length){if(f>>1;n(l[p],c)<0?f=p+1:h=p}while(f>>1;n(l[p],c)<=0?f=p+1:h=p}while(ff&&r(l[p-1],c)>-r(l[p],c)?p-1:p}return{left:i,center:s,right:o}}function hte(){return 0}function aF(e){return e===null?NaN:+e}function*pte(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const mte=c_(uo),Xc=mte.right;c_(aF).center;class fM extends Map{constructor(t,n=gte){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(dM(this,t))}has(t){return super.has(dM(this,t))}set(t,n){return super.set(yte(this,t),n)}delete(t){return super.delete(vte(this,t))}}function dM({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function yte({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function vte({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function gte(e){return e!==null&&typeof e=="object"?e.valueOf():e}function bte(e=uo){if(e===uo)return sF;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function sF(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const xte=Math.sqrt(50),wte=Math.sqrt(10),Ste=Math.sqrt(2);function Oh(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),s=o>=xte?10:o>=wte?5:o>=Ste?2:1;let l,c,f;return i<0?(f=Math.pow(10,-i)/s,l=Math.round(e*f),c=Math.round(t*f),l/ft&&--c,f=-f):(f=Math.pow(10,i)*s,l=Math.round(e/f),c=Math.round(t/f),l*ft&&--c),c0))return[];if(e===t)return[e];const r=t=i))return[];const l=o-i+1,c=new Array(l);if(r)if(s<0)for(let f=0;f=r)&&(n=r);return n}function pM(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function lF(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?sF:bte(i);r>n;){if(r-n>600){const c=r-n+1,f=t-n+1,h=Math.log(c),p=.5*Math.exp(2*h/3),y=.5*Math.sqrt(h*p*(c-p)/c)*(f-c/2<0?-1:1),g=Math.max(n,Math.floor(t-f*p/c+y)),S=Math.min(r,Math.floor(t+(c-f)*p/c+y));lF(e,t,g,S,i)}const o=e[t];let s=n,l=r;for(cu(e,n,t),i(e[r],o)>0&&cu(e,n,r);s0;)--l}i(e[n],o)===0?cu(e,n,l):(++l,cu(e,l,r)),l<=t&&(n=l+1),t<=l&&(r=l-1)}return e}function cu(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function _te(e,t,n){if(e=Float64Array.from(pte(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return pM(e);if(t>=1)return hM(e);var r,i=(r-1)*t,o=Math.floor(i),s=hM(lF(e,o).subarray(0,o+1)),l=pM(e.subarray(o+1));return s+(l-s)*(i-o)}}function Ate(e,t,n=aF){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),s=+n(e[o],o,e),l=+n(e[o+1],o+1,e);return s+(l-s)*(i-o)}}function Ote(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Cd(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Cd(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Ete.exec(e))?new Cn(t[1],t[2],t[3],1):(t=Tte.exec(e))?new Cn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Cte.exec(e))?Cd(t[1],t[2],t[3],t[4]):(t=kte.exec(e))?Cd(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Rte.exec(e))?wM(t[1],t[2]/100,t[3]/100,1):(t=jte.exec(e))?wM(t[1],t[2]/100,t[3]/100,t[4]):mM.hasOwnProperty(e)?gM(mM[e]):e==="transparent"?new Cn(NaN,NaN,NaN,0):null}function gM(e){return new Cn(e>>16&255,e>>8&255,e&255,1)}function Cd(e,t,n,r){return r<=0&&(e=t=n=NaN),new Cn(e,t,n,r)}function Ite(e){return e instanceof Yc||(e=oc(e)),e?(e=e.rgb(),new Cn(e.r,e.g,e.b,e.opacity)):new Cn}function qw(e,t,n,r){return arguments.length===1?Ite(e):new Cn(e,t,n,r??1)}function Cn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}d_(Cn,qw,cF(Yc,{brighter(e){return e=e==null?Ph:Math.pow(Ph,e),new Cn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?rc:Math.pow(rc,e),new Cn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Cn(ca(this.r),ca(this.g),ca(this.b),Eh(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:bM,formatHex:bM,formatHex8:Dte,formatRgb:xM,toString:xM}));function bM(){return`#${Go(this.r)}${Go(this.g)}${Go(this.b)}`}function Dte(){return`#${Go(this.r)}${Go(this.g)}${Go(this.b)}${Go((isNaN(this.opacity)?1:this.opacity)*255)}`}function xM(){const e=Eh(this.opacity);return`${e===1?"rgb(":"rgba("}${ca(this.r)}, ${ca(this.g)}, ${ca(this.b)}${e===1?")":`, ${e})`}`}function Eh(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ca(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Go(e){return e=ca(e),(e<16?"0":"")+e.toString(16)}function wM(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new _r(e,t,n,r)}function fF(e){if(e instanceof _r)return new _r(e.h,e.s,e.l,e.opacity);if(e instanceof Yc||(e=oc(e)),!e)return new _r;if(e instanceof _r)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),s=NaN,l=o-i,c=(o+i)/2;return l?(t===o?s=(n-r)/l+(n0&&c<1?0:s,new _r(s,l,c,e.opacity)}function Lte(e,t,n,r){return arguments.length===1?fF(e):new _r(e,t,n,r??1)}function _r(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}d_(_r,Lte,cF(Yc,{brighter(e){return e=e==null?Ph:Math.pow(Ph,e),new _r(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?rc:Math.pow(rc,e),new _r(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Cn(jb(e>=240?e-240:e+120,i,r),jb(e,i,r),jb(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new _r(SM(this.h),kd(this.s),kd(this.l),Eh(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Eh(this.opacity);return`${e===1?"hsl(":"hsla("}${SM(this.h)}, ${kd(this.s)*100}%, ${kd(this.l)*100}%${e===1?")":`, ${e})`}`}}));function SM(e){return e=(e||0)%360,e<0?e+360:e}function kd(e){return Math.max(0,Math.min(1,e||0))}function jb(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const h_=e=>()=>e;function $te(e,t){return function(n){return e+n*t}}function Bte(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Fte(e){return(e=+e)==1?dF:function(t,n){return n-t?Bte(t,n,e):h_(isNaN(t)?n:t)}}function dF(e,t){var n=t-e;return n?$te(e,n):h_(isNaN(e)?t:e)}const _M=(function e(t){var n=Fte(t);function r(i,o){var s=n((i=qw(i)).r,(o=qw(o)).r),l=n(i.g,o.g),c=n(i.b,o.b),f=dF(i.opacity,o.opacity);return function(h){return i.r=s(h),i.g=l(h),i.b=c(h),i.opacity=f(h),i+""}}return r.gamma=e,r})(1);function Ute(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;in&&(o=t.slice(n,o),l[s]?l[s]+=o:l[++s]=o),(r=r[0])===(i=i[0])?l[s]?l[s]+=i:l[++s]=i:(l[++s]=null,c.push({i:s,x:Th(r,i)})),n=Mb.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function Zte(e,t,n){var r=e[0],i=e[1],o=t[0],s=t[1];return i2?Jte:Zte,c=f=null,p}function p(y){return y==null||isNaN(y=+y)?o:(c||(c=l(e.map(r),t,n)))(r(s(y)))}return p.invert=function(y){return s(i((f||(f=l(t,e.map(r),Th)))(y)))},p.domain=function(y){return arguments.length?(e=Array.from(y,Ch),h()):e.slice()},p.range=function(y){return arguments.length?(t=Array.from(y),h()):t.slice()},p.rangeRound=function(y){return t=Array.from(y),n=p_,h()},p.clamp=function(y){return arguments.length?(s=y?!0:bn,h()):s!==bn},p.interpolate=function(y){return arguments.length?(n=y,h()):n},p.unknown=function(y){return arguments.length?(o=y,p):o},function(y,g){return r=y,i=g,h()}}function m_(){return Ip()(bn,bn)}function ene(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function kh(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Bs(e){return e=kh(Math.abs(e)),e?e[1]:NaN}function tne(e,t){return function(n,r){for(var i=n.length,o=[],s=0,l=e[0],c=0;i>0&&l>0&&(c+l+1>r&&(l=Math.max(1,r-c)),o.push(n.substring(i-=l,i+l)),!((c+=l+1)>r));)l=e[s=(s+1)%e.length];return o.reverse().join(t)}}function nne(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var rne=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ac(e){if(!(t=rne.exec(e)))throw new Error("invalid format: "+e);var t;return new y_({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}ac.prototype=y_.prototype;function y_(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}y_.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function ine(e){e:for(var t=e.length,n=1,r=-1,i;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var Rh;function one(e,t){var n=kh(e,t);if(!n)return Rh=void 0,e.toPrecision(t);var r=n[0],i=n[1],o=i-(Rh=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=r.length;return o===s?r:o>s?r+new Array(o-s+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+kh(e,Math.max(0,t+o-1))[0]}function OM(e,t){var n=kh(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const PM={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:ene,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>OM(e*100,t),r:OM,s:one,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function EM(e){return e}var TM=Array.prototype.map,CM=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ane(e){var t=e.grouping===void 0||e.thousands===void 0?EM:tne(TM.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?EM:nne(TM.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function f(p,y){p=ac(p);var g=p.fill,S=p.align,b=p.sign,v=p.symbol,w=p.zero,A=p.width,O=p.comma,T=p.precision,P=p.trim,C=p.type;C==="n"?(O=!0,C="g"):PM[C]||(T===void 0&&(T=12),P=!0,C="g"),(w||g==="0"&&S==="=")&&(w=!0,g="0",S="=");var k=(y&&y.prefix!==void 0?y.prefix:"")+(v==="$"?n:v==="#"&&/[boxX]/.test(C)?"0"+C.toLowerCase():""),j=(v==="$"?r:/[%p]/.test(C)?s:"")+(y&&y.suffix!==void 0?y.suffix:""),N=PM[C],U=/[defgprs%]/.test(C);T=T===void 0?6:/[gprs]/.test(C)?Math.max(1,Math.min(21,T)):Math.max(0,Math.min(20,T));function L($){var G=k,F=j,X,J,ee;if(C==="c")F=N($)+F,$="";else{$=+$;var Q=$<0||1/$<0;if($=isNaN($)?c:N(Math.abs($),T),P&&($=ine($)),Q&&+$==0&&b!=="+"&&(Q=!1),G=(Q?b==="("?b:l:b==="-"||b==="("?"":b)+G,F=(C==="s"&&!isNaN($)&&Rh!==void 0?CM[8+Rh/3]:"")+F+(Q&&b==="("?")":""),U){for(X=-1,J=$.length;++Xee||ee>57){F=(ee===46?i+$.slice(X+1):$.slice(X))+F,$=$.slice(0,X);break}}}O&&!w&&($=t($,1/0));var ne=G.length+$.length+F.length,V=ne>1)+G+$+F+V.slice(ne);break;default:$=V+G+$+F;break}return o($)}return L.toString=function(){return p+""},L}function h(p,y){var g=Math.max(-8,Math.min(8,Math.floor(Bs(y)/3)))*3,S=Math.pow(10,-g),b=f((p=ac(p),p.type="f",p),{suffix:CM[8+g/3]});return function(v){return b(S*v)}}return{format:f,formatPrefix:h}}var Rd,v_,hF;sne({thousands:",",grouping:[3],currency:["$",""]});function sne(e){return Rd=ane(e),v_=Rd.format,hF=Rd.formatPrefix,Rd}function lne(e){return Math.max(0,-Bs(Math.abs(e)))}function une(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Bs(t)/3)))*3-Bs(Math.abs(e)))}function cne(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Bs(t)-Bs(e))+1}function pF(e,t,n,r){var i=Fw(e,t,n),o;switch(r=ac(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=une(i,s))&&(r.precision=o),hF(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=cne(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=lne(i))&&(r.precision=o-(r.type==="%")*2);break}}return v_(r)}function go(e){var t=e.domain;return e.ticks=function(n){var r=t();return $w(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return pF(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,s=r[i],l=r[o],c,f,h=10;for(l0;){if(f=Bw(s,l,n),f===c)return r[i]=s,r[o]=l,t(r);if(f>0)s=Math.floor(s/f)*f,l=Math.ceil(l/f)*f;else if(f<0)s=Math.ceil(s*f)/f,l=Math.floor(l*f)/f;else break;c=f}return e},e}function jh(){var e=m_();return e.copy=function(){return Zc(e,jh())},ur.apply(e,arguments),go(e)}function mF(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,Ch),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return mF(e).unknown(t)},e=arguments.length?Array.from(e,Ch):[0,1],go(n)}function yF(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],s;return oMath.pow(e,t)}function mne(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function jM(e){return(t,n)=>-e(-t,n)}function g_(e){const t=e(kM,RM),n=t.domain;let r=10,i,o;function s(){return i=mne(r),o=pne(r),n()[0]<0?(i=jM(i),o=jM(o),e(fne,dne)):e(kM,RM),t}return t.base=function(l){return arguments.length?(r=+l,s()):r},t.domain=function(l){return arguments.length?(n(l),s()):n()},t.ticks=l=>{const c=n();let f=c[0],h=c[c.length-1];const p=h0){for(;y<=g;++y)for(S=1;Sh)break;w.push(b)}}else for(;y<=g;++y)for(S=r-1;S>=1;--S)if(b=y>0?S/o(-y):S*o(y),!(bh)break;w.push(b)}w.length*2{if(l==null&&(l=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=ac(c)).precision==null&&(c.trim=!0),c=v_(c)),l===1/0)return c;const f=Math.max(1,r*l/t.ticks().length);return h=>{let p=h/o(Math.round(i(h)));return p*rn(yF(n(),{floor:l=>o(Math.floor(i(l))),ceil:l=>o(Math.ceil(i(l)))})),t}function vF(){const e=g_(Ip()).domain([1,10]);return e.copy=()=>Zc(e,vF()).base(e.base()),ur.apply(e,arguments),e}function MM(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function NM(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function b_(e){var t=1,n=e(MM(t),NM(t));return n.constant=function(r){return arguments.length?e(MM(t=+r),NM(t)):t},go(n)}function gF(){var e=b_(Ip());return e.copy=function(){return Zc(e,gF()).constant(e.constant())},ur.apply(e,arguments)}function IM(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function yne(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function vne(e){return e<0?-e*e:e*e}function x_(e){var t=e(bn,bn),n=1;function r(){return n===1?e(bn,bn):n===.5?e(yne,vne):e(IM(n),IM(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},go(t)}function w_(){var e=x_(Ip());return e.copy=function(){return Zc(e,w_()).exponent(e.exponent())},ur.apply(e,arguments),e}function gne(){return w_.apply(null,arguments).exponent(.5)}function DM(e){return Math.sign(e)*e*e}function bne(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function bF(){var e=m_(),t=[0,1],n=!1,r;function i(o){var s=bne(e(o));return isNaN(s)?r:n?Math.round(s):s}return i.invert=function(o){return e.invert(DM(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,Ch)).map(DM)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return bF(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},ur.apply(i,arguments),go(i)}function xF(){var e=[],t=[],n=[],r;function i(){var s=0,l=Math.max(1,t.length);for(n=new Array(l-1);++s0?n[l-1]:e[0],l=n?[r[n-1],t]:[r[f-1],r[f]]},s.unknown=function(c){return arguments.length&&(o=c),s},s.thresholds=function(){return r.slice()},s.copy=function(){return wF().domain([e,t]).range(i).unknown(o)},ur.apply(go(s),arguments)}function SF(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[Xc(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var s=t.indexOf(o);return[e[s-1],e[s]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return SF().domain(e).range(t).unknown(n)},ur.apply(i,arguments)}const Nb=new Date,Ib=new Date;function Bt(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const s=i(o),l=i.ceil(o);return o-s(t(o=new Date(+o),s==null?1:Math.floor(s)),o),i.range=(o,s,l)=>{const c=[];if(o=i.ceil(o),l=l==null?1:Math.floor(l),!(o0))return c;let f;do c.push(f=new Date(+o)),t(o,l),e(o);while(fBt(s=>{if(s>=s)for(;e(s),!o(s);)s.setTime(s-1)},(s,l)=>{if(s>=s)if(l<0)for(;++l<=0;)for(;t(s,-1),!o(s););else for(;--l>=0;)for(;t(s,1),!o(s););}),n&&(i.count=(o,s)=>(Nb.setTime(+o),Ib.setTime(+s),e(Nb),e(Ib),Math.floor(n(Nb,Ib))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?s=>r(s)%o===0:s=>i.count(0,s)%o===0):i)),i}const Mh=Bt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Mh.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Bt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Mh);Mh.range;const li=1e3,ar=li*60,ui=ar*60,vi=ui*24,S_=vi*7,LM=vi*30,Db=vi*365,Qo=Bt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*li)},(e,t)=>(t-e)/li,e=>e.getUTCSeconds());Qo.range;const __=Bt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*li)},(e,t)=>{e.setTime(+e+t*ar)},(e,t)=>(t-e)/ar,e=>e.getMinutes());__.range;const A_=Bt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*ar)},(e,t)=>(t-e)/ar,e=>e.getUTCMinutes());A_.range;const O_=Bt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*li-e.getMinutes()*ar)},(e,t)=>{e.setTime(+e+t*ui)},(e,t)=>(t-e)/ui,e=>e.getHours());O_.range;const P_=Bt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ui)},(e,t)=>(t-e)/ui,e=>e.getUTCHours());P_.range;const Jc=Bt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ar)/vi,e=>e.getDate()-1);Jc.range;const Dp=Bt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/vi,e=>e.getUTCDate()-1);Dp.range;const _F=Bt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/vi,e=>Math.floor(e/vi));_F.range;function Oa(e){return Bt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ar)/S_)}const Lp=Oa(0),Nh=Oa(1),xne=Oa(2),wne=Oa(3),Fs=Oa(4),Sne=Oa(5),_ne=Oa(6);Lp.range;Nh.range;xne.range;wne.range;Fs.range;Sne.range;_ne.range;function Pa(e){return Bt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/S_)}const $p=Pa(0),Ih=Pa(1),Ane=Pa(2),One=Pa(3),Us=Pa(4),Pne=Pa(5),Ene=Pa(6);$p.range;Ih.range;Ane.range;One.range;Us.range;Pne.range;Ene.range;const E_=Bt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());E_.range;const T_=Bt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());T_.range;const gi=Bt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());gi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Bt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});gi.range;const bi=Bt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());bi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Bt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});bi.range;function AF(e,t,n,r,i,o){const s=[[Qo,1,li],[Qo,5,5*li],[Qo,15,15*li],[Qo,30,30*li],[o,1,ar],[o,5,5*ar],[o,15,15*ar],[o,30,30*ar],[i,1,ui],[i,3,3*ui],[i,6,6*ui],[i,12,12*ui],[r,1,vi],[r,2,2*vi],[n,1,S_],[t,1,LM],[t,3,3*LM],[e,1,Db]];function l(f,h,p){const y=hv).right(s,y);if(g===s.length)return e.every(Fw(f/Db,h/Db,p));if(g===0)return Mh.every(Math.max(Fw(f,h,p),1));const[S,b]=s[y/s[g-1][2]53)return null;"w"in oe||(oe.w=1),"Z"in oe?(De=$b(fu(oe.y,0,1)),Ge=De.getUTCDay(),De=Ge>4||Ge===0?Ih.ceil(De):Ih(De),De=Dp.offset(De,(oe.V-1)*7),oe.y=De.getUTCFullYear(),oe.m=De.getUTCMonth(),oe.d=De.getUTCDate()+(oe.w+6)%7):(De=Lb(fu(oe.y,0,1)),Ge=De.getDay(),De=Ge>4||Ge===0?Nh.ceil(De):Nh(De),De=Jc.offset(De,(oe.V-1)*7),oe.y=De.getFullYear(),oe.m=De.getMonth(),oe.d=De.getDate()+(oe.w+6)%7)}else("W"in oe||"U"in oe)&&("w"in oe||(oe.w="u"in oe?oe.u%7:"W"in oe?1:0),Ge="Z"in oe?$b(fu(oe.y,0,1)).getUTCDay():Lb(fu(oe.y,0,1)).getDay(),oe.m=0,oe.d="W"in oe?(oe.w+6)%7+oe.W*7-(Ge+5)%7:oe.w+oe.U*7-(Ge+6)%7);return"Z"in oe?(oe.H+=oe.Z/100|0,oe.M+=oe.Z%100,$b(oe)):Lb(oe)}}function j(ie,Oe,Ce,oe){for(var He=0,De=Oe.length,Ge=Ce.length,xe,Qe;He=Ge)return-1;if(xe=Oe.charCodeAt(He++),xe===37){if(xe=Oe.charAt(He++),Qe=P[xe in $M?Oe.charAt(He++):xe],!Qe||(oe=Qe(ie,Ce,oe))<0)return-1}else if(xe!=Ce.charCodeAt(oe++))return-1}return oe}function N(ie,Oe,Ce){var oe=f.exec(Oe.slice(Ce));return oe?(ie.p=h.get(oe[0].toLowerCase()),Ce+oe[0].length):-1}function U(ie,Oe,Ce){var oe=g.exec(Oe.slice(Ce));return oe?(ie.w=S.get(oe[0].toLowerCase()),Ce+oe[0].length):-1}function L(ie,Oe,Ce){var oe=p.exec(Oe.slice(Ce));return oe?(ie.w=y.get(oe[0].toLowerCase()),Ce+oe[0].length):-1}function $(ie,Oe,Ce){var oe=w.exec(Oe.slice(Ce));return oe?(ie.m=A.get(oe[0].toLowerCase()),Ce+oe[0].length):-1}function G(ie,Oe,Ce){var oe=b.exec(Oe.slice(Ce));return oe?(ie.m=v.get(oe[0].toLowerCase()),Ce+oe[0].length):-1}function F(ie,Oe,Ce){return j(ie,t,Oe,Ce)}function X(ie,Oe,Ce){return j(ie,n,Oe,Ce)}function J(ie,Oe,Ce){return j(ie,r,Oe,Ce)}function ee(ie){return s[ie.getDay()]}function Q(ie){return o[ie.getDay()]}function ne(ie){return c[ie.getMonth()]}function V(ie){return l[ie.getMonth()]}function D(ie){return i[+(ie.getHours()>=12)]}function K(ie){return 1+~~(ie.getMonth()/3)}function ae(ie){return s[ie.getUTCDay()]}function he(ie){return o[ie.getUTCDay()]}function me(ie){return c[ie.getUTCMonth()]}function ce(ie){return l[ie.getUTCMonth()]}function Ee(ie){return i[+(ie.getUTCHours()>=12)]}function Te(ie){return 1+~~(ie.getUTCMonth()/3)}return{format:function(ie){var Oe=C(ie+="",O);return Oe.toString=function(){return ie},Oe},parse:function(ie){var Oe=k(ie+="",!1);return Oe.toString=function(){return ie},Oe},utcFormat:function(ie){var Oe=C(ie+="",T);return Oe.toString=function(){return ie},Oe},utcParse:function(ie){var Oe=k(ie+="",!0);return Oe.toString=function(){return ie},Oe}}}var $M={"-":"",_:" ",0:"0"},Ht=/^\s*\d+/,Mne=/^%/,Nne=/[\\^$*+?|[\]().{}]/g;function Ze(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o[t.toLowerCase(),n]))}function Dne(e,t,n){var r=Ht.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Lne(e,t,n){var r=Ht.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function $ne(e,t,n){var r=Ht.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Bne(e,t,n){var r=Ht.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Fne(e,t,n){var r=Ht.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function BM(e,t,n){var r=Ht.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function FM(e,t,n){var r=Ht.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Une(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function qne(e,t,n){var r=Ht.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function zne(e,t,n){var r=Ht.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function UM(e,t,n){var r=Ht.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Vne(e,t,n){var r=Ht.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function qM(e,t,n){var r=Ht.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Wne(e,t,n){var r=Ht.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Hne(e,t,n){var r=Ht.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Kne(e,t,n){var r=Ht.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Gne(e,t,n){var r=Ht.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Qne(e,t,n){var r=Mne.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Xne(e,t,n){var r=Ht.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Yne(e,t,n){var r=Ht.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function zM(e,t){return Ze(e.getDate(),t,2)}function Zne(e,t){return Ze(e.getHours(),t,2)}function Jne(e,t){return Ze(e.getHours()%12||12,t,2)}function ere(e,t){return Ze(1+Jc.count(gi(e),e),t,3)}function OF(e,t){return Ze(e.getMilliseconds(),t,3)}function tre(e,t){return OF(e,t)+"000"}function nre(e,t){return Ze(e.getMonth()+1,t,2)}function rre(e,t){return Ze(e.getMinutes(),t,2)}function ire(e,t){return Ze(e.getSeconds(),t,2)}function ore(e){var t=e.getDay();return t===0?7:t}function are(e,t){return Ze(Lp.count(gi(e)-1,e),t,2)}function PF(e){var t=e.getDay();return t>=4||t===0?Fs(e):Fs.ceil(e)}function sre(e,t){return e=PF(e),Ze(Fs.count(gi(e),e)+(gi(e).getDay()===4),t,2)}function lre(e){return e.getDay()}function ure(e,t){return Ze(Nh.count(gi(e)-1,e),t,2)}function cre(e,t){return Ze(e.getFullYear()%100,t,2)}function fre(e,t){return e=PF(e),Ze(e.getFullYear()%100,t,2)}function dre(e,t){return Ze(e.getFullYear()%1e4,t,4)}function hre(e,t){var n=e.getDay();return e=n>=4||n===0?Fs(e):Fs.ceil(e),Ze(e.getFullYear()%1e4,t,4)}function pre(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ze(t/60|0,"0",2)+Ze(t%60,"0",2)}function VM(e,t){return Ze(e.getUTCDate(),t,2)}function mre(e,t){return Ze(e.getUTCHours(),t,2)}function yre(e,t){return Ze(e.getUTCHours()%12||12,t,2)}function vre(e,t){return Ze(1+Dp.count(bi(e),e),t,3)}function EF(e,t){return Ze(e.getUTCMilliseconds(),t,3)}function gre(e,t){return EF(e,t)+"000"}function bre(e,t){return Ze(e.getUTCMonth()+1,t,2)}function xre(e,t){return Ze(e.getUTCMinutes(),t,2)}function wre(e,t){return Ze(e.getUTCSeconds(),t,2)}function Sre(e){var t=e.getUTCDay();return t===0?7:t}function _re(e,t){return Ze($p.count(bi(e)-1,e),t,2)}function TF(e){var t=e.getUTCDay();return t>=4||t===0?Us(e):Us.ceil(e)}function Are(e,t){return e=TF(e),Ze(Us.count(bi(e),e)+(bi(e).getUTCDay()===4),t,2)}function Ore(e){return e.getUTCDay()}function Pre(e,t){return Ze(Ih.count(bi(e)-1,e),t,2)}function Ere(e,t){return Ze(e.getUTCFullYear()%100,t,2)}function Tre(e,t){return e=TF(e),Ze(e.getUTCFullYear()%100,t,2)}function Cre(e,t){return Ze(e.getUTCFullYear()%1e4,t,4)}function kre(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Us(e):Us.ceil(e),Ze(e.getUTCFullYear()%1e4,t,4)}function Rre(){return"+0000"}function WM(){return"%"}function HM(e){return+e}function KM(e){return Math.floor(+e/1e3)}var ns,CF,kF;jre({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function jre(e){return ns=jne(e),CF=ns.format,ns.parse,kF=ns.utcFormat,ns.utcParse,ns}function Mre(e){return new Date(e)}function Nre(e){return e instanceof Date?+e:+new Date(+e)}function C_(e,t,n,r,i,o,s,l,c,f){var h=m_(),p=h.invert,y=h.domain,g=f(".%L"),S=f(":%S"),b=f("%I:%M"),v=f("%I %p"),w=f("%a %d"),A=f("%b %d"),O=f("%B"),T=f("%Y");function P(C){return(c(C)t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>_te(e,o/r))},n.copy=function(){return NF(t).domain(e)},_i.apply(n,arguments)}function Fp(){var e=0,t=.5,n=1,r=1,i,o,s,l,c,f=bn,h,p=!1,y;function g(b){return isNaN(b=+b)?y:(b=.5+((b=+h(b))-o)*(r*bn}return Fb=e,Fb}var Ub,YM;function Fre(){if(YM)return Ub;YM=1;var e=$F(),t=Bre(),n=fl();function r(i){return i&&i.length?e(i,n,t):void 0}return Ub=r,Ub}var Ure=Fre();const oo=rt(Ure);var qb,ZM;function qre(){if(ZM)return qb;ZM=1;function e(t,n){return te.e^o.s<0?1:-1;for(r=o.d.length,i=e.d.length,t=0,n=re.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1};be.decimalPlaces=be.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*dt;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};be.dividedBy=be.div=function(e){return mi(this,new this.constructor(e))};be.dividedToIntegerBy=be.idiv=function(e){var t=this,n=t.constructor;return st(mi(t,new n(e),0,1),n.precision)};be.equals=be.eq=function(e){return!this.cmp(e)};be.exponent=function(){return jt(this)};be.greaterThan=be.gt=function(e){return this.cmp(e)>0};be.greaterThanOrEqualTo=be.gte=function(e){return this.cmp(e)>=0};be.isInteger=be.isint=function(){return this.e>this.d.length-2};be.isNegative=be.isneg=function(){return this.s<0};be.isPositive=be.ispos=function(){return this.s>0};be.isZero=function(){return this.s===0};be.lessThan=be.lt=function(e){return this.cmp(e)<0};be.lessThanOrEqualTo=be.lte=function(e){return this.cmp(e)<1};be.logarithm=be.log=function(e){var t,n=this,r=n.constructor,i=r.precision,o=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Un))throw Error(lr+"NaN");if(n.s<1)throw Error(lr+(n.s?"NaN":"-Infinity"));return n.eq(Un)?new r(0):(mt=!1,t=mi(lc(n,o),lc(e,o),o),mt=!0,st(t,i))};be.minus=be.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?qF(t,e):FF(t,(e.s=-e.s,e))};be.modulo=be.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(lr+"NaN");return n.s?(mt=!1,t=mi(n,e,0,1).times(e),mt=!0,n.minus(t)):st(new r(n),i)};be.naturalExponential=be.exp=function(){return UF(this)};be.naturalLogarithm=be.ln=function(){return lc(this)};be.negated=be.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};be.plus=be.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?FF(t,e):qF(t,(e.s=-e.s,e))};be.precision=be.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(fa+e);if(t=jt(i)+1,r=i.d.length-1,n=r*dt+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};be.squareRoot=be.sqrt=function(){var e,t,n,r,i,o,s,l=this,c=l.constructor;if(l.s<1){if(!l.s)return new c(0);throw Error(lr+"NaN")}for(e=jt(l),mt=!1,i=Math.sqrt(+l),i==0||i==1/0?(t=Lr(l.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=ml((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new c(t)):r=new c(i.toString()),n=c.precision,i=s=n+3;;)if(o=r,r=o.plus(mi(l,o,s+2)).times(.5),Lr(o.d).slice(0,s)===(t=Lr(r.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(st(o,n+1,0),o.times(o).eq(l)){r=o;break}}else if(t!="9999")break;s+=4}return mt=!0,st(r,n)};be.times=be.mul=function(e){var t,n,r,i,o,s,l,c,f,h=this,p=h.constructor,y=h.d,g=(e=new p(e)).d;if(!h.s||!e.s)return new p(0);for(e.s*=h.s,n=h.e+e.e,c=y.length,f=g.length,c=0;){for(t=0,i=c+r;i>r;)l=o[i]+g[r]*y[i-r-1]+t,o[i--]=l%Wt|0,t=l/Wt|0;o[i]=(o[i]+t)%Wt|0}for(;!o[--s];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,mt?st(e,p.precision):e};be.toDecimalPlaces=be.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Wr(e,0,pl),t===void 0?t=r.rounding:Wr(t,0,8),st(n,e+jt(n)+1,t))};be.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=ba(r,!0):(Wr(e,0,pl),t===void 0?t=i.rounding:Wr(t,0,8),r=st(new i(r),e+1,t),n=ba(r,!0,e+1)),n};be.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?ba(i):(Wr(e,0,pl),t===void 0?t=o.rounding:Wr(t,0,8),r=st(new o(i),e+jt(i)+1,t),n=ba(r.abs(),!1,e+jt(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};be.toInteger=be.toint=function(){var e=this,t=e.constructor;return st(new t(e),jt(e)+1,t.rounding)};be.toNumber=function(){return+this};be.toPower=be.pow=function(e){var t,n,r,i,o,s,l=this,c=l.constructor,f=12,h=+(e=new c(e));if(!e.s)return new c(Un);if(l=new c(l),!l.s){if(e.s<1)throw Error(lr+"Infinity");return l}if(l.eq(Un))return l;if(r=c.precision,e.eq(Un))return st(l,r);if(t=e.e,n=e.d.length-1,s=t>=n,o=l.s,s){if((n=h<0?-h:h)<=BF){for(i=new c(Un),t=Math.ceil(r/dt+4),mt=!1;n%2&&(i=i.times(l),iN(i.d,t)),n=ml(n/2),n!==0;)l=l.times(l),iN(l.d,t);return mt=!0,e.s<0?new c(Un).div(i):st(i,r)}}else if(o<0)throw Error(lr+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,l.s=1,mt=!1,i=e.times(lc(l,r+f)),mt=!0,i=UF(i),i.s=o,i};be.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=jt(i),r=ba(i,n<=o.toExpNeg||n>=o.toExpPos)):(Wr(e,1,pl),t===void 0?t=o.rounding:Wr(t,0,8),i=st(new o(i),e,t),n=jt(i),r=ba(i,e<=n||n<=o.toExpNeg,e)),r};be.toSignificantDigits=be.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Wr(e,1,pl),t===void 0?t=r.rounding:Wr(t,0,8)),st(new r(n),e,t)};be.toString=be.valueOf=be.val=be.toJSON=be[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=jt(e),n=e.constructor;return ba(e,t<=n.toExpNeg||t>=n.toExpPos)};function FF(e,t){var n,r,i,o,s,l,c,f,h=e.constructor,p=h.precision;if(!e.s||!t.s)return t.s||(t=new h(e)),mt?st(t,p):t;if(c=e.d,f=t.d,s=e.e,i=t.e,c=c.slice(),o=s-i,o){for(o<0?(r=c,o=-o,l=f.length):(r=f,i=s,l=c.length),s=Math.ceil(p/dt),l=s>l?s+1:l+1,o>l&&(o=l,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(l=c.length,o=f.length,l-o<0&&(o=l,r=f,f=c,c=r),n=0;o;)n=(c[--o]=c[o]+f[o]+n)/Wt|0,c[o]%=Wt;for(n&&(c.unshift(n),++i),l=c.length;c[--l]==0;)c.pop();return t.d=c,t.e=i,mt?st(t,p):t}function Wr(e,t,n){if(e!==~~e||en)throw Error(fa+e)}function Lr(e){var t,n,r,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;ts?1:-1;else for(l=c=0;li[l]?1:-1;break}return c}function n(r,i,o){for(var s=0;o--;)r[o]-=s,s=r[o]1;)r.shift()}return function(r,i,o,s){var l,c,f,h,p,y,g,S,b,v,w,A,O,T,P,C,k,j,N=r.constructor,U=r.s==i.s?1:-1,L=r.d,$=i.d;if(!r.s)return new N(r);if(!i.s)throw Error(lr+"Division by zero");for(c=r.e-i.e,k=$.length,P=L.length,g=new N(U),S=g.d=[],f=0;$[f]==(L[f]||0);)++f;if($[f]>(L[f]||0)&&--c,o==null?A=o=N.precision:s?A=o+(jt(r)-jt(i))+1:A=o,A<0)return new N(0);if(A=A/dt+2|0,f=0,k==1)for(h=0,$=$[0],A++;(f1&&($=e($,h),L=e(L,h),k=$.length,P=L.length),T=k,b=L.slice(0,k),v=b.length;v=Wt/2&&++C;do h=0,l=t($,b,k,v),l<0?(w=b[0],k!=v&&(w=w*Wt+(b[1]||0)),h=w/C|0,h>1?(h>=Wt&&(h=Wt-1),p=e($,h),y=p.length,v=b.length,l=t(p,b,y,v),l==1&&(h--,n(p,k16)throw Error(j_+jt(e));if(!e.s)return new h(Un);for(mt=!1,l=p,s=new h(.03125);e.abs().gte(.1);)e=e.times(s),f+=5;for(r=Math.log(zo(2,f))/Math.LN10*2+5|0,l+=r,n=i=o=new h(Un),h.precision=l;;){if(i=st(i.times(e),l),n=n.times(++c),s=o.plus(mi(i,n,l)),Lr(s.d).slice(0,l)===Lr(o.d).slice(0,l)){for(;f--;)o=st(o.times(o),l);return h.precision=p,t==null?(mt=!0,st(o,p)):o}o=s}}function jt(e){for(var t=e.e*dt,n=e.d[0];n>=10;n/=10)t++;return t}function Kb(e,t,n){if(t>e.LN10.sd())throw mt=!0,n&&(e.precision=n),Error(lr+"LN10 precision limit exceeded");return st(new e(e.LN10),t)}function Gi(e){for(var t="";e--;)t+="0";return t}function lc(e,t){var n,r,i,o,s,l,c,f,h,p=1,y=10,g=e,S=g.d,b=g.constructor,v=b.precision;if(g.s<1)throw Error(lr+(g.s?"NaN":"-Infinity"));if(g.eq(Un))return new b(0);if(t==null?(mt=!1,f=v):f=t,g.eq(10))return t==null&&(mt=!0),Kb(b,f);if(f+=y,b.precision=f,n=Lr(S),r=n.charAt(0),o=jt(g),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)g=g.times(e),n=Lr(g.d),r=n.charAt(0),p++;o=jt(g),r>1?(g=new b("0."+n),o++):g=new b(r+"."+n.slice(1))}else return c=Kb(b,f+2,v).times(o+""),g=lc(new b(r+"."+n.slice(1)),f-y).plus(c),b.precision=v,t==null?(mt=!0,st(g,v)):g;for(l=s=g=mi(g.minus(Un),g.plus(Un),f),h=st(g.times(g),f),i=3;;){if(s=st(s.times(h),f),c=l.plus(mi(s,new b(i),f)),Lr(c.d).slice(0,f)===Lr(l.d).slice(0,f))return l=l.times(2),o!==0&&(l=l.plus(Kb(b,f+2,v).times(o+""))),l=mi(l,new b(p),f),b.precision=v,t==null?(mt=!0,st(l,v)):l;l=c,i+=2}}function rN(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=ml(n/dt),e.d=[],r=(n+1)%dt,n<0&&(r+=dt),rDh||e.e<-Dh))throw Error(j_+n)}else e.s=0,e.e=0,e.d=[0];return e}function st(e,t,n){var r,i,o,s,l,c,f,h,p=e.d;for(s=1,o=p[0];o>=10;o/=10)s++;if(r=t-s,r<0)r+=dt,i=t,f=p[h=0];else{if(h=Math.ceil((r+1)/dt),o=p.length,h>=o)return e;for(f=o=p[h],s=1;o>=10;o/=10)s++;r%=dt,i=r-dt+s}if(n!==void 0&&(o=zo(10,s-i-1),l=f/o%10|0,c=t<0||p[h+1]!==void 0||f%o,c=n<4?(l||c)&&(n==0||n==(e.s<0?3:2)):l>5||l==5&&(n==4||c||n==6&&(r>0?i>0?f/zo(10,s-i):0:p[h-1])%10&1||n==(e.s<0?8:7))),t<1||!p[0])return c?(o=jt(e),p.length=1,t=t-o-1,p[0]=zo(10,(dt-t%dt)%dt),e.e=ml(-t/dt)||0):(p.length=1,p[0]=e.e=e.s=0),e;if(r==0?(p.length=h,o=1,h--):(p.length=h+1,o=zo(10,dt-r),p[h]=i>0?(f/zo(10,s-i)%zo(10,i)|0)*o:0),c)for(;;)if(h==0){(p[0]+=o)==Wt&&(p[0]=1,++e.e);break}else{if(p[h]+=o,p[h]!=Wt)break;p[h--]=0,o=1}for(r=p.length;p[--r]===0;)p.pop();if(mt&&(e.e>Dh||e.e<-Dh))throw Error(j_+jt(e));return e}function qF(e,t){var n,r,i,o,s,l,c,f,h,p,y=e.constructor,g=y.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new y(e),mt?st(t,g):t;if(c=e.d,p=t.d,r=t.e,f=e.e,c=c.slice(),s=f-r,s){for(h=s<0,h?(n=c,s=-s,l=p.length):(n=p,r=f,l=c.length),i=Math.max(Math.ceil(g/dt),l)+2,s>i&&(s=i,n.length=1),n.reverse(),i=s;i--;)n.push(0);n.reverse()}else{for(i=c.length,l=p.length,h=i0;--i)c[l++]=0;for(i=p.length;i>s;){if(c[--i]0?o=o.charAt(0)+"."+o.slice(1)+Gi(r):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Gi(-i-1)+o,n&&(r=n-s)>0&&(o+=Gi(r))):i>=s?(o+=Gi(i+1-s),n&&(r=n-i-1)>0&&(o=o+"."+Gi(r))):((r=i+1)0&&(i+1===s&&(o+="."),o+=Gi(r))),e.s<0?"-"+o:o}function iN(e,t){if(e.length>t)return e.length=t,!0}function zF(e){var t,n,r;function i(o){var s=this;if(!(s instanceof i))return new i(o);if(s.constructor=i,o instanceof i){s.s=o.s,s.e=o.e,s.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(fa+o);if(o>0)s.s=1;else if(o<0)o=-o,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(o===~~o&&o<1e7){s.e=0,s.d=[o];return}return rN(s,o.toString())}else if(typeof o!="string")throw Error(fa+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,Zre.test(o))rN(s,o);else throw Error(fa+o)}if(i.prototype=be,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=zF,i.config=i.set=Jre,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(fa+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(fa+n+": "+r);return this}var M_=zF(Yre);Un=new M_(1);const it=M_;function eie(e){return iie(e)||rie(e)||nie(e)||tie()}function tie(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nie(e,t){if(e){if(typeof e=="string")return Ww(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ww(e,t)}}function rie(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function iie(e){if(Array.isArray(e))return Ww(e)}function Ww(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t?n.apply(void 0,i):e(t-s,oN(function(){for(var l=arguments.length,c=new Array(l),f=0;fe.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,o=void 0;try{for(var s=e[Symbol.iterator](),l;!(r=(l=s.next()).done)&&(n.push(l.value),!(t&&n.length===t));r=!0);}catch(c){i=!0,o=c}finally{try{!r&&s.return!=null&&s.return()}finally{if(i)throw o}}return n}}function bie(e){if(Array.isArray(e))return e}function GF(e){var t=uc(e,2),n=t[0],r=t[1],i=n,o=r;return n>r&&(i=r,o=n),[i,o]}function QF(e,t,n){if(e.lte(0))return new it(0);var r=zp.getDigitCount(e.toNumber()),i=new it(10).pow(r),o=e.div(i),s=r!==1?.05:.1,l=new it(Math.ceil(o.div(s).toNumber())).add(n).mul(s),c=l.mul(i);return t?c:new it(Math.ceil(c))}function xie(e,t,n){var r=1,i=new it(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new it(10).pow(zp.getDigitCount(e)-1),i=new it(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new it(Math.floor(e)))}else e===0?i=new it(Math.floor((t-1)/2)):n||(i=new it(Math.floor(e)));var s=Math.floor((t-1)/2),l=lie(sie(function(c){return i.add(new it(c-s).mul(r)).toNumber()}),Hw);return l(0,t)}function XF(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new it(0),tickMin:new it(0),tickMax:new it(0)};var o=QF(new it(t).sub(e).div(n-1),r,i),s;e<=0&&t>=0?s=new it(0):(s=new it(e).add(t).div(2),s=s.sub(new it(s).mod(o)));var l=Math.ceil(s.sub(e).div(o).toNumber()),c=Math.ceil(new it(t).sub(s).div(o).toNumber()),f=l+c+1;return f>n?XF(e,t,n,r,i+1):(f0?c+(n-f):c,l=t>0?l:l+(n-f)),{step:o,tickMin:s.sub(new it(l).mul(o)),tickMax:s.add(new it(c).mul(o))})}function wie(e){var t=uc(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=Math.max(i,2),l=GF([n,r]),c=uc(l,2),f=c[0],h=c[1];if(f===-1/0||h===1/0){var p=h===1/0?[f].concat(Gw(Hw(0,i-1).map(function(){return 1/0}))):[].concat(Gw(Hw(0,i-1).map(function(){return-1/0})),[h]);return n>r?Kw(p):p}if(f===h)return xie(f,i,o);var y=XF(f,h,s,o),g=y.step,S=y.tickMin,b=y.tickMax,v=zp.rangeStep(S,b.add(new it(.1).mul(g)),g);return n>r?Kw(v):v}function Sie(e,t){var n=uc(e,2),r=n[0],i=n[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=GF([r,i]),l=uc(s,2),c=l[0],f=l[1];if(c===-1/0||f===1/0)return[r,i];if(c===f)return[c];var h=Math.max(t,2),p=QF(new it(f).sub(c).div(h-1),o,0),y=[].concat(Gw(zp.rangeStep(new it(c),new it(f).sub(new it(.99).mul(p)),p)),[f]);return r>i?Kw(y):y}var _ie=HF(wie),Aie=HF(Sie),Oie="Invariant failed";function xa(e,t){throw new Error(Oie)}var Pie=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function qs(e){"@babel/helpers - typeof";return qs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qs(e)}function Lh(){return Lh=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Mie(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Nie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Iie(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,s=-1,l=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(l<=1)return 0;if(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var c=o.range,f=0;f0?i[f-1].coordinate:i[l-1].coordinate,p=i[f].coordinate,y=f>=l-1?i[0].coordinate:i[f+1].coordinate,g=void 0;if(Ar(p-h)!==Ar(y-p)){var S=[];if(Ar(y-p)===Ar(c[1]-c[0])){g=y;var b=p+c[1]-c[0];S[0]=Math.min(b,(b+h)/2),S[1]=Math.max(b,(b+h)/2)}else{g=h;var v=y+c[1]-c[0];S[0]=Math.min(p,(v+p)/2),S[1]=Math.max(p,(v+p)/2)}var w=[Math.min(p,(g+p)/2),Math.max(p,(g+p)/2)];if(t>w[0]&&t<=w[1]||t>=S[0]&&t<=S[1]){s=i[f].index;break}}else{var A=Math.min(h,y),O=Math.max(h,y);if(t>(A+p)/2&&t<=(O+p)/2){s=i[f].index;break}}}else for(var T=0;T0&&T(r[T].coordinate+r[T-1].coordinate)/2&&t<=(r[T].coordinate+r[T+1].coordinate)/2||T===l-1&&t>(r[T].coordinate+r[T-1].coordinate)/2){s=r[T].index;break}return s},N_=function(t){var n,r=t,i=r.type.displayName,o=(n=t.type)!==null&&n!==void 0&&n.defaultProps?_t(_t({},t.type.defaultProps),t.props):t.props,s=o.stroke,l=o.fill,c;switch(i){case"Line":c=s;break;case"Area":case"Radar":c=s&&s!=="none"?s:l;break;default:c=l;break}return c},Zie=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,o=i===void 0?{}:i;if(!o)return{};for(var s={},l=Object.keys(o),c=0,f=l.length;c=0});if(w&&w.length){var A=w[0].type.defaultProps,O=A!==void 0?_t(_t({},A),w[0].props):w[0].props,T=O.barSize,P=O[v];s[P]||(s[P]=[]);var C=Ue(T)?n:T;s[P].push({item:w[0],stackList:w.slice(1),barSize:Ue(C)?void 0:ga(C,r,0)})}}return s},Jie=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,o=t.sizeList,s=o===void 0?[]:o,l=t.maxBarSize,c=s.length;if(c<1)return null;var f=ga(n,i,0,!0),h,p=[];if(s[0].barSize===+s[0].barSize){var y=!1,g=i/c,S=s.reduce(function(T,P){return T+P.barSize||0},0);S+=(c-1)*f,S>=i&&(S-=(c-1)*f,f=0),S>=i&&g>0&&(y=!0,g*=.9,S=c*g);var b=(i-S)/2>>0,v={offset:b-f,size:0};h=s.reduce(function(T,P){var C={item:P.item,position:{offset:v.offset+v.size+f,size:y?g:P.barSize}},k=[].concat(lN(T),[C]);return v=k[k.length-1].position,P.stackList&&P.stackList.length&&P.stackList.forEach(function(j){k.push({item:j,position:v})}),k},p)}else{var w=ga(r,i,0,!0);i-2*w-(c-1)*f<=0&&(f=0);var A=(i-2*w-(c-1)*f)/c;A>1&&(A>>=0);var O=l===+l?Math.min(A,l):A;h=s.reduce(function(T,P,C){var k=[].concat(lN(T),[{item:P.item,position:{offset:w+(A+f)*C+(A-O)/2,size:O}}]);return P.stackList&&P.stackList.length&&P.stackList.forEach(function(j){k.push({item:j,position:k[k.length-1].position})}),k},p)}return h},eoe=function(t,n,r,i){var o=r.children,s=r.width,l=r.margin,c=s-(l.left||0)-(l.right||0),f=e3({children:o,legendWidth:c});if(f){var h=i||{},p=h.width,y=h.height,g=f.align,S=f.verticalAlign,b=f.layout;if((b==="vertical"||b==="horizontal"&&S==="middle")&&g!=="center"&&de(t[g]))return _t(_t({},t),{},ys({},g,t[g]+(p||0)));if((b==="horizontal"||b==="vertical"&&g==="center")&&S!=="middle"&&de(t[S]))return _t(_t({},t),{},ys({},S,t[S]+(y||0)))}return t},toe=function(t,n,r){return Ue(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},t3=function(t,n,r,i,o){var s=n.props.children,l=Or(s,Vp).filter(function(f){return toe(i,o,f.props.direction)});if(l&&l.length){var c=l.map(function(f){return f.props.dataKey});return t.reduce(function(f,h){var p=Vn(h,r);if(Ue(p))return f;var y=Array.isArray(p)?[Up(p),oo(p)]:[p,p],g=c.reduce(function(S,b){var v=Vn(h,b,0),w=y[0]-Math.abs(Array.isArray(v)?v[0]:v),A=y[1]+Math.abs(Array.isArray(v)?v[1]:v);return[Math.min(w,S[0]),Math.max(A,S[1])]},[1/0,-1/0]);return[Math.min(g[0],f[0]),Math.max(g[1],f[1])]},[1/0,-1/0])}return null},noe=function(t,n,r,i,o){var s=n.map(function(l){return t3(t,l,r,o,i)}).filter(function(l){return!Ue(l)});return s&&s.length?s.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]):null},n3=function(t,n,r,i,o){var s=n.map(function(c){var f=c.props.dataKey;return r==="number"&&f&&t3(t,c,f,i)||Lu(t,f,r,o)});if(r==="number")return s.reduce(function(c,f){return[Math.min(c[0],f[0]),Math.max(c[1],f[1])]},[1/0,-1/0]);var l={};return s.reduce(function(c,f){for(var h=0,p=f.length;h=2?Ar(l[0]-l[1])*2*f:f,n&&(t.ticks||t.niceTicks)){var h=(t.ticks||t.niceTicks).map(function(p){var y=o?o.indexOf(p):p;return{coordinate:i(y)+f,value:p,offset:f}});return h.filter(function(p){return!cl(p.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(p,y){return{coordinate:i(p)+f,value:p,index:y,offset:f}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(p){return{coordinate:i(p)+f,value:p,offset:f}}):i.domain().map(function(p,y){return{coordinate:i(p)+f,value:o?o[p]:p,index:y,offset:f}})},Gb=new WeakMap,jd=function(t,n){if(typeof n!="function")return t;Gb.has(t)||Gb.set(t,new WeakMap);var r=Gb.get(t);if(r.has(n))return r.get(n);var i=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},roe=function(t,n,r){var i=t.scale,o=t.type,s=t.layout,l=t.axisType;if(i==="auto")return s==="radial"&&l==="radiusAxis"?{scale:nc(),realScaleType:"band"}:s==="radial"&&l==="angleAxis"?{scale:jh(),realScaleType:"linear"}:o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Du(),realScaleType:"point"}:o==="category"?{scale:nc(),realScaleType:"band"}:{scale:jh(),realScaleType:"linear"};if(va(i)){var c="scale".concat(Tp(i));return{scale:(GM[c]||Du)(),realScaleType:GM[c]?c:"point"}}return Le(i)?{scale:i}:{scale:Du(),realScaleType:"point"}},cN=1e-4,ioe=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),o=Math.min(i[0],i[1])-cN,s=Math.max(i[0],i[1])+cN,l=t(n[0]),c=t(n[r-1]);(ls||cs)&&t.domain([n[0],n[r-1]])}},ooe=function(t,n){if(!t)return null;for(var r=0,i=t.length;ri)&&(o[1]=i),o[0]>i&&(o[0]=i),o[1]=0?(t[l][r][0]=o,t[l][r][1]=o+c,o=t[l][r][1]):(t[l][r][0]=s,t[l][r][1]=s+c,s=t[l][r][1])}},loe=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r=0?(t[s][r][0]=o,t[s][r][1]=o+l,o=t[s][r][1]):(t[s][r][0]=0,t[s][r][1]=0)}},uoe={sign:soe,expand:WY,none:Ns,silhouette:HY,wiggle:KY,positive:loe},coe=function(t,n,r){var i=n.map(function(l){return l.props.dataKey}),o=uoe[r],s=VY().keys(i).value(function(l,c){return+Vn(l,c,0)}).order(Ew).offset(o);return s(t)},foe=function(t,n,r,i,o,s){if(!t)return null;var l=s?n.reverse():n,c={},f=l.reduce(function(p,y){var g,S=(g=y.type)!==null&&g!==void 0&&g.defaultProps?_t(_t({},y.type.defaultProps),y.props):y.props,b=S.stackId,v=S.hide;if(v)return p;var w=S[r],A=p[w]||{hasStack:!1,stackGroups:{}};if($t(b)){var O=A.stackGroups[b]||{numericAxisId:r,cateAxisId:i,items:[]};O.items.push(y),A.hasStack=!0,A.stackGroups[b]=O}else A.stackGroups[Gc("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[y]};return _t(_t({},p),{},ys({},w,A))},c),h={};return Object.keys(f).reduce(function(p,y){var g=f[y];if(g.hasStack){var S={};g.stackGroups=Object.keys(g.stackGroups).reduce(function(b,v){var w=g.stackGroups[v];return _t(_t({},b),{},ys({},v,{numericAxisId:r,cateAxisId:i,items:w.items,stackedData:coe(t,w.items,o)}))},S)}return _t(_t({},p),{},ys({},y,g))},h)},doe=function(t,n){var r=n.realScaleType,i=n.type,o=n.tickCount,s=n.originalDomain,l=n.allowDecimals,c=r||n.scale;if(c!=="auto"&&c!=="linear")return null;if(o&&i==="number"&&s&&(s[0]==="auto"||s[1]==="auto")){var f=t.domain();if(!f.length)return null;var h=_ie(f,o,l);return t.domain([Up(h),oo(h)]),{niceTicks:h}}if(o&&i==="number"){var p=t.domain(),y=Aie(p,o,l);return{niceTicks:y}}return null};function fN(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,o=e.index,s=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Ue(i[t.dataKey])){var l=fh(n,"value",i[t.dataKey]);if(l)return l.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var c=Vn(i,Ue(s)?t.dataKey:s);return Ue(c)?null:t.scale(c)}var dN=function(t){var n=t.axis,r=t.ticks,i=t.offset,o=t.bandSize,s=t.entry,l=t.index;if(n.type==="category")return r[l]?r[l].coordinate+i:null;var c=Vn(s,n.dataKey,n.domain[l]);return Ue(c)?null:n.scale(c)-o/2+i},hoe=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),o=Math.max(r[0],r[1]);return i<=0&&o>=0?0:o<0?o:i}return r[0]},poe=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?_t(_t({},t.type.defaultProps),t.props):t.props,o=i.stackId;if($t(o)){var s=n[o];if(s){var l=s.items.indexOf(t);return l>=0?s.stackedData[l]:null}}return null},moe=function(t){return t.reduce(function(n,r){return[Up(r.concat([n[0]]).filter(de)),oo(r.concat([n[1]]).filter(de))]},[1/0,-1/0])},o3=function(t,n,r){return Object.keys(t).reduce(function(i,o){var s=t[o],l=s.stackedData,c=l.reduce(function(f,h){var p=moe(h.slice(n,r+1));return[Math.min(f[0],p[0]),Math.max(f[1],p[1])]},[1/0,-1/0]);return[Math.min(c[0],i[0]),Math.max(c[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},hN=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,pN=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Zw=function(t,n,r){if(Le(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(de(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(hN.test(t[0])){var o=+hN.exec(t[0])[1];i[0]=n[0]-o}else Le(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(de(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(pN.test(t[1])){var s=+pN.exec(t[1])[1];i[1]=n[1]+s}else Le(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},Bh=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!r||i>0)return i}if(t&&n&&n.length>=2){for(var o=l_(n,function(p){return p.coordinate}),s=1/0,l=1,c=o.length;ls&&(f=2*Math.PI-f),{radius:l,angle:boe(f),angleInRadian:f}},Soe=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),o=Math.floor(r/360),s=Math.min(i,o);return{startAngle:n-s*360,endAngle:r-s*360}},_oe=function(t,n){var r=n.startAngle,i=n.endAngle,o=Math.floor(r/360),s=Math.floor(i/360),l=Math.min(o,s);return t+l*360},gN=function(t,n){var r=t.x,i=t.y,o=woe({x:r,y:i},n),s=o.radius,l=o.angle,c=n.innerRadius,f=n.outerRadius;if(sf)return!1;if(s===0)return!0;var h=Soe(n),p=h.startAngle,y=h.endAngle,g=l,S;if(p<=y){for(;g>y;)g-=360;for(;g=p&&g<=y}else{for(;g>p;)g-=360;for(;g=y&&g<=p}return S?vN(vN({},n),{},{radius:s,angle:_oe(g,n)}):null};function hc(e){"@babel/helpers - typeof";return hc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hc(e)}var Aoe=["offset"];function Ooe(e){return Coe(e)||Toe(e)||Eoe(e)||Poe()}function Poe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Eoe(e,t){if(e){if(typeof e=="string")return Jw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Jw(e,t)}}function Toe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Coe(e){if(Array.isArray(e))return Jw(e)}function Jw(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Roe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function bN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Lt(e){for(var t=1;t=0?1:-1,O,T;i==="insideStart"?(O=g+A*s,T=b):i==="insideEnd"?(O=S-A*s,T=!b):i==="end"&&(O=S+A*s,T=b),T=w<=0?T:!T;var P=tn(f,h,v,O),C=tn(f,h,v,O+(T?1:-1)*359),k="M".concat(P.x,",").concat(P.y,` A`).concat(v,",").concat(v,",0,1,").concat(T?0:1,`, `).concat(C.x,",").concat(C.y),j=Ue(t.id)?Gc("recharts-radial-line-"):t.id;return z.createElement("text",pc({},r,{dominantBaseline:"central",className:We("recharts-radial-bar-label",l)}),z.createElement("defs",null,z.createElement("path",{id:j,d:k})),z.createElement("textPath",{xlinkHref:"#".concat(j)},n))},$oe=function(t){var n=t.viewBox,r=t.offset,i=t.position,o=n,s=o.cx,l=o.cy,c=o.innerRadius,f=o.outerRadius,h=o.startAngle,p=o.endAngle,y=(h+p)/2;if(i==="outside"){var g=tn(s,l,f+r,y),S=g.x,b=g.y;return{x:S,y:b,textAnchor:S>=s?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:s,y:l,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:s,y:l,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:s,y:l,textAnchor:"middle",verticalAnchor:"end"};var v=(c+f)/2,w=tn(s,l,v,y),A=w.x,O=w.y;return{x:A,y:O,textAnchor:"middle",verticalAnchor:"middle"}},Boe=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,o=t.position,s=n,l=s.x,c=s.y,f=s.width,h=s.height,p=h>=0?1:-1,y=p*i,g=p>0?"end":"start",S=p>0?"start":"end",b=f>=0?1:-1,v=b*i,w=b>0?"end":"start",A=b>0?"start":"end";if(o==="top"){var O={x:l+f/2,y:c-p*i,textAnchor:"middle",verticalAnchor:g};return Lt(Lt({},O),r?{height:Math.max(c-r.y,0),width:f}:{})}if(o==="bottom"){var T={x:l+f/2,y:c+h+y,textAnchor:"middle",verticalAnchor:S};return Lt(Lt({},T),r?{height:Math.max(r.y+r.height-(c+h),0),width:f}:{})}if(o==="left"){var P={x:l-v,y:c+h/2,textAnchor:w,verticalAnchor:"middle"};return Lt(Lt({},P),r?{width:Math.max(P.x-r.x,0),height:h}:{})}if(o==="right"){var C={x:l+f+v,y:c+h/2,textAnchor:A,verticalAnchor:"middle"};return Lt(Lt({},C),r?{width:Math.max(r.x+r.width-C.x,0),height:h}:{})}var k=r?{width:f,height:h}:{};return o==="insideLeft"?Lt({x:l+v,y:c+h/2,textAnchor:A,verticalAnchor:"middle"},k):o==="insideRight"?Lt({x:l+f-v,y:c+h/2,textAnchor:w,verticalAnchor:"middle"},k):o==="insideTop"?Lt({x:l+f/2,y:c+y,textAnchor:"middle",verticalAnchor:S},k):o==="insideBottom"?Lt({x:l+f/2,y:c+h-y,textAnchor:"middle",verticalAnchor:g},k):o==="insideTopLeft"?Lt({x:l+v,y:c+y,textAnchor:A,verticalAnchor:S},k):o==="insideTopRight"?Lt({x:l+f-v,y:c+y,textAnchor:w,verticalAnchor:S},k):o==="insideBottomLeft"?Lt({x:l+v,y:c+h-y,textAnchor:A,verticalAnchor:g},k):o==="insideBottomRight"?Lt({x:l+f-v,y:c+h-y,textAnchor:w,verticalAnchor:g},k):ul(o)&&(de(o.x)||Ko(o.x))&&(de(o.y)||Ko(o.y))?Lt({x:l+ga(o.x,f),y:c+ga(o.y,h),textAnchor:"end",verticalAnchor:"end"},k):Lt({x:l+f/2,y:c+h/2,textAnchor:"middle",verticalAnchor:"middle"},k)},Foe=function(t){return"cx"in t&&de(t.cx)};function dn(e){var t=e.offset,n=t===void 0?5:t,r=koe(e,Aoe),i=Lt({offset:n},r),o=i.viewBox,s=i.position,l=i.value,c=i.children,f=i.content,h=i.className,p=h===void 0?"":h,y=i.textBreakAll;if(!o||Ue(l)&&Ue(c)&&!M.isValidElement(f)&&!Le(f))return null;if(M.isValidElement(f))return M.cloneElement(f,i);var g;if(Le(f)){if(g=M.createElement(f,i),M.isValidElement(g))return g}else g=Ioe(i);var S=Foe(o),b=Fe(i,!0);if(S&&(s==="insideStart"||s==="insideEnd"||s==="end"))return Loe(i,g,b);var v=S?$oe(i):Boe(i);return z.createElement(Ah,pc({className:We("recharts-label",p)},b,v,{breakAll:y}),g)}dn.displayName="Label";var s3=function(t){var n=t.cx,r=t.cy,i=t.angle,o=t.startAngle,s=t.endAngle,l=t.r,c=t.radius,f=t.innerRadius,h=t.outerRadius,p=t.x,y=t.y,g=t.top,S=t.left,b=t.width,v=t.height,w=t.clockWise,A=t.labelViewBox;if(A)return A;if(de(b)&&de(v)){if(de(p)&&de(y))return{x:p,y,width:b,height:v};if(de(g)&&de(S))return{x:g,y:S,width:b,height:v}}return de(p)&&de(y)?{x:p,y,width:0,height:0}:de(n)&&de(r)?{cx:n,cy:r,startAngle:o||i||0,endAngle:s||i||0,innerRadius:f||0,outerRadius:h||c||l||0,clockWise:w}:t.viewBox?t.viewBox:{}},Uoe=function(t,n){return t?t===!0?z.createElement(dn,{key:"label-implicit",viewBox:n}):$t(t)?z.createElement(dn,{key:"label-implicit",viewBox:n,value:t}):M.isValidElement(t)?t.type===dn?M.cloneElement(t,{key:"label-implicit",viewBox:n}):z.createElement(dn,{key:"label-implicit",content:t,viewBox:n}):Le(t)?z.createElement(dn,{key:"label-implicit",content:t,viewBox:n}):ul(t)?z.createElement(dn,pc({viewBox:n},t,{key:"label-implicit"})):null:null},qoe=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var i=t.children,o=s3(t),s=Or(i,dn).map(function(c,f){return M.cloneElement(c,{viewBox:n||o,key:"label-".concat(f)})});if(!r)return s;var l=Uoe(t.label,n||o);return[l].concat(Ooe(s))};dn.parseViewBox=s3;dn.renderCallByParent=qoe;var Qb,xN;function zoe(){if(xN)return Qb;xN=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return Qb=e,Qb}var Voe=zoe();const Woe=rt(Voe);function mc(e){"@babel/helpers - typeof";return mc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mc(e)}var Hoe=["valueAccessor"],Koe=["data","dataKey","clockWise","id","textBreakAll"];function Goe(e){return Zoe(e)||Yoe(e)||Xoe(e)||Qoe()}function Qoe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xoe(e,t){if(e){if(typeof e=="string")return e1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e1(e,t)}}function Yoe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Zoe(e){if(Array.isArray(e))return e1(e)}function e1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function nae(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var rae=function(t){return Array.isArray(t.value)?Woe(t.value):t.value};function co(e){var t=e.valueAccessor,n=t===void 0?rae:t,r=_N(e,Hoe),i=r.data,o=r.dataKey,s=r.clockWise,l=r.id,c=r.textBreakAll,f=_N(r,Koe);return!i||!i.length?null:z.createElement(bt,{className:"recharts-label-list"},i.map(function(h,p){var y=Ue(o)?n(h,p):Vn(h&&h.payload,o),g=Ue(l)?{}:{id:"".concat(l,"-").concat(p)};return z.createElement(dn,Uh({},Fe(h,!0),f,g,{parentViewBox:h.parentViewBox,value:y,textBreakAll:c,viewBox:dn.parseViewBox(Ue(s)?h:SN(SN({},h),{},{clockWise:s})),key:"label-".concat(p),index:p}))}))}co.displayName="LabelList";function iae(e,t){return e?e===!0?z.createElement(co,{key:"labelList-implicit",data:t}):z.isValidElement(e)||Le(e)?z.createElement(co,{key:"labelList-implicit",data:t,content:e}):ul(e)?z.createElement(co,Uh({data:t},e,{key:"labelList-implicit"})):null:null}function oae(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=Or(r,co).map(function(s,l){return M.cloneElement(s,{data:t,key:"labelList-".concat(l)})});if(!n)return i;var o=iae(e.label,t);return[o].concat(Goe(i))}co.renderCallByParent=oae;function yc(e){"@babel/helpers - typeof";return yc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yc(e)}function t1(){return t1=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(s>f),`, `).concat(p.x,",").concat(p.y,` `);if(i>0){var g=tn(n,r,i,s),S=tn(n,r,i,f);y+="L ".concat(S.x,",").concat(S.y,` A `).concat(i,",").concat(i,`,0, `).concat(+(Math.abs(c)>180),",").concat(+(s<=f),`, `).concat(g.x,",").concat(g.y," Z")}else y+="L ".concat(n,",").concat(r," Z");return y},cae=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,o=t.outerRadius,s=t.cornerRadius,l=t.forceCornerRadius,c=t.cornerIsExternal,f=t.startAngle,h=t.endAngle,p=Ar(h-f),y=Md({cx:n,cy:r,radius:o,angle:f,sign:p,cornerRadius:s,cornerIsExternal:c}),g=y.circleTangency,S=y.lineTangency,b=y.theta,v=Md({cx:n,cy:r,radius:o,angle:h,sign:-p,cornerRadius:s,cornerIsExternal:c}),w=v.circleTangency,A=v.lineTangency,O=v.theta,T=c?Math.abs(f-h):Math.abs(f-h)-b-O;if(T<0)return l?"M ".concat(S.x,",").concat(S.y,` a`).concat(s,",").concat(s,",0,0,1,").concat(s*2,`,0 a`).concat(s,",").concat(s,",0,0,1,").concat(-s*2,`,0 `):l3({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:f,endAngle:h});var P="M ".concat(S.x,",").concat(S.y,` A`).concat(s,",").concat(s,",0,0,").concat(+(p<0),",").concat(g.x,",").concat(g.y,` A`).concat(o,",").concat(o,",0,").concat(+(T>180),",").concat(+(p<0),",").concat(w.x,",").concat(w.y,` A`).concat(s,",").concat(s,",0,0,").concat(+(p<0),",").concat(A.x,",").concat(A.y,` `);if(i>0){var C=Md({cx:n,cy:r,radius:i,angle:f,sign:p,isExternal:!0,cornerRadius:s,cornerIsExternal:c}),k=C.circleTangency,j=C.lineTangency,N=C.theta,U=Md({cx:n,cy:r,radius:i,angle:h,sign:-p,isExternal:!0,cornerRadius:s,cornerIsExternal:c}),L=U.circleTangency,$=U.lineTangency,G=U.theta,F=c?Math.abs(f-h):Math.abs(f-h)-N-G;if(F<0&&s===0)return"".concat(P,"L").concat(n,",").concat(r,"Z");P+="L".concat($.x,",").concat($.y,` A`).concat(s,",").concat(s,",0,0,").concat(+(p<0),",").concat(L.x,",").concat(L.y,` A`).concat(i,",").concat(i,",0,").concat(+(F>180),",").concat(+(p>0),",").concat(k.x,",").concat(k.y,` A`).concat(s,",").concat(s,",0,0,").concat(+(p<0),",").concat(j.x,",").concat(j.y,"Z")}else P+="L".concat(n,",").concat(r,"Z");return P},fae={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},u3=function(t){var n=ON(ON({},fae),t),r=n.cx,i=n.cy,o=n.innerRadius,s=n.outerRadius,l=n.cornerRadius,c=n.forceCornerRadius,f=n.cornerIsExternal,h=n.startAngle,p=n.endAngle,y=n.className;if(s0&&Math.abs(h-p)<360?v=cae({cx:r,cy:i,innerRadius:o,outerRadius:s,cornerRadius:Math.min(b,S/2),forceCornerRadius:c,cornerIsExternal:f,startAngle:h,endAngle:p}):v=l3({cx:r,cy:i,innerRadius:o,outerRadius:s,startAngle:h,endAngle:p}),z.createElement("path",t1({},Fe(n,!0),{className:g,d:v,role:"img"}))};function vc(e){"@babel/helpers - typeof";return vc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vc(e)}function n1(){return n1=Object.assign?Object.assign.bind():function(e){for(var t=1;t_ae.call(e,t));function Ea(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const Pae="__v",Eae="__o",Tae="_owner",{getOwnPropertyDescriptor:MN,keys:NN}=Object;function Cae(e,t){return e.byteLength===t.byteLength&&qh(new Uint8Array(e),new Uint8Array(t))}function kae(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function Rae(e,t){return e.byteLength===t.byteLength&&qh(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function jae(e,t){return Ea(e.getTime(),t.getTime())}function Mae(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function Nae(e,t){return e===t}function IN(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),o=e.entries();let s,l,c=0;for(;(s=o.next())&&!s.done;){const f=t.entries();let h=!1,p=0;for(;(l=f.next())&&!l.done;){if(i[p]){p++;continue}const y=s.value,g=l.value;if(n.equals(y[0],g[0],c,p,e,t,n)&&n.equals(y[1],g[1],y[0],g[0],e,t,n)){h=i[p]=!0;break}p++}if(!h)return!1;c++}return!0}const Iae=Ea;function Dae(e,t,n){const r=NN(e);let i=r.length;if(NN(t).length!==i)return!1;for(;i-- >0;)if(!c3(e,t,n,r[i]))return!1;return!0}function yu(e,t,n){const r=jN(e);let i=r.length;if(jN(t).length!==i)return!1;let o,s,l;for(;i-- >0;)if(o=r[i],!c3(e,t,n,o)||(s=MN(e,o),l=MN(t,o),(s||l)&&(!s||!l||s.configurable!==l.configurable||s.enumerable!==l.enumerable||s.writable!==l.writable)))return!1;return!0}function Lae(e,t){return Ea(e.valueOf(),t.valueOf())}function $ae(e,t){return e.source===t.source&&e.flags===t.flags}function DN(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),o=e.values();let s,l;for(;(s=o.next())&&!s.done;){const c=t.values();let f=!1,h=0;for(;(l=c.next())&&!l.done;){if(!i[h]&&n.equals(s.value,l.value,s.value,l.value,e,t,n)){f=i[h]=!0;break}h++}if(!f)return!1}return!0}function qh(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function Bae(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function c3(e,t,n,r){return(r===Tae||r===Eae||r===Pae)&&(e.$$typeof||t.$$typeof)?!0:Oae(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const Fae="[object ArrayBuffer]",Uae="[object Arguments]",qae="[object Boolean]",zae="[object DataView]",Vae="[object Date]",Wae="[object Error]",Hae="[object Map]",Kae="[object Number]",Gae="[object Object]",Qae="[object RegExp]",Xae="[object Set]",Yae="[object String]",Zae={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},Jae="[object URL]",ese=Object.prototype.toString;function tse({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:o,areMapsEqual:s,areNumbersEqual:l,areObjectsEqual:c,arePrimitiveWrappersEqual:f,areRegExpsEqual:h,areSetsEqual:p,areTypedArraysEqual:y,areUrlsEqual:g,unknownTagComparators:S}){return function(v,w,A){if(v===w)return!0;if(v==null||w==null)return!1;const O=typeof v;if(O!==typeof w)return!1;if(O!=="object")return O==="number"?l(v,w,A):O==="function"?o(v,w,A):!1;const T=v.constructor;if(T!==w.constructor)return!1;if(T===Object)return c(v,w,A);if(Array.isArray(v))return t(v,w,A);if(T===Date)return r(v,w,A);if(T===RegExp)return h(v,w,A);if(T===Map)return s(v,w,A);if(T===Set)return p(v,w,A);const P=ese.call(v);if(P===Vae)return r(v,w,A);if(P===Qae)return h(v,w,A);if(P===Hae)return s(v,w,A);if(P===Xae)return p(v,w,A);if(P===Gae)return typeof v.then!="function"&&typeof w.then!="function"&&c(v,w,A);if(P===Jae)return g(v,w,A);if(P===Wae)return i(v,w,A);if(P===Uae)return c(v,w,A);if(Zae[P])return y(v,w,A);if(P===Fae)return e(v,w,A);if(P===zae)return n(v,w,A);if(P===qae||P===Kae||P===Yae)return f(v,w,A);if(S){let C=S[P];if(!C){const k=Aae(v);k&&(C=S[k])}if(C)return C(v,w,A)}return!1}}function nse({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:Cae,areArraysEqual:n?yu:kae,areDataViewsEqual:Rae,areDatesEqual:jae,areErrorsEqual:Mae,areFunctionsEqual:Nae,areMapsEqual:n?Jb(IN,yu):IN,areNumbersEqual:Iae,areObjectsEqual:n?yu:Dae,arePrimitiveWrappersEqual:Lae,areRegExpsEqual:$ae,areSetsEqual:n?Jb(DN,yu):DN,areTypedArraysEqual:n?Jb(qh,yu):qh,areUrlsEqual:Bae,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const i=Id(r.areArraysEqual),o=Id(r.areMapsEqual),s=Id(r.areObjectsEqual),l=Id(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:s,areSetsEqual:l})}return r}function rse(e){return function(t,n,r,i,o,s,l){return e(t,n,l)}}function ise({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(l,c){const{cache:f=e?new WeakMap:void 0,meta:h}=n();return t(l,c,{cache:f,equals:r,meta:h,strict:i})};if(e)return function(l,c){return t(l,c,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};const o={cache:void 0,equals:r,meta:void 0,strict:i};return function(l,c){return t(l,c,o)}}const ose=xo();xo({strict:!0});xo({circular:!0});xo({circular:!0,strict:!0});xo({createInternalComparator:()=>Ea});xo({strict:!0,createInternalComparator:()=>Ea});xo({circular:!0,createInternalComparator:()=>Ea});xo({circular:!0,createInternalComparator:()=>Ea,strict:!0});function xo(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,o=nse(e),s=tse(o),l=n?n(s):rse(s);return ise({circular:t,comparator:s,createState:r,equals:l,strict:i})}function ase(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function LN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(o){n<0&&(n=o),o-n>t?(e(o),n=-1):ase(i)};requestAnimationFrame(r)}function r1(e){"@babel/helpers - typeof";return r1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r1(e)}function sse(e){return fse(e)||cse(e)||use(e)||lse()}function lse(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function use(e,t){if(e){if(typeof e=="string")return $N(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $N(e,t)}}function $N(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?1:w<0?0:w},b=function(w){for(var A=w>1?1:w,O=A,T=0;T<8;++T){var P=p(O)-A,C=g(O);if(Math.abs(P-A)0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,o=i===void 0?8:i,s=t.dt,l=s===void 0?17:s,c=function(h,p,y){var g=-(h-p)*r,S=y*o,b=y+(g-S)*l/1e3,v=y*l/1e3+h;return Math.abs(v-p)e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qse(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function ex(e){return Hse(e)||Wse(e)||Vse(e)||zse()}function zse(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vse(e,t){if(e){if(typeof e=="string")return l1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l1(e,t)}}function Wse(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Hse(e){if(Array.isArray(e))return l1(e)}function l1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Wh(e){return Wh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Wh(e)}var xi=(function(e){Yse(n,e);var t=Zse(n);function n(r,i){var o;Kse(this,n),o=t.call(this,r,i);var s=o.props,l=s.isActive,c=s.attributeName,f=s.from,h=s.to,p=s.steps,y=s.children,g=s.duration;if(o.handleStyleChange=o.handleStyleChange.bind(f1(o)),o.changeStyle=o.changeStyle.bind(f1(o)),!l||g<=0)return o.state={style:{}},typeof y=="function"&&(o.state={style:h}),c1(o);if(p&&p.length)o.state={style:p[0].style};else if(f){if(typeof y=="function")return o.state={style:f},c1(o);o.state={style:c?Tu({},c,f):f}}else o.state={style:{}};return o}return Qse(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isActive,s=i.canBegin;this.mounted=!0,!(!o||!s)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var o=this.props,s=o.isActive,l=o.canBegin,c=o.attributeName,f=o.shouldReAnimate,h=o.to,p=o.from,y=this.state.style;if(l){if(!s){var g={style:c?Tu({},c,h):h};this.state&&y&&(c&&y[c]!==h||!c&&y!==h)&&this.setState(g);return}if(!(ose(i.to,h)&&i.canBegin&&i.isActive)){var S=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var b=S||f?p:i.to;if(this.state&&y){var v={style:c?Tu({},c,b):b};(c&&y[c]!==b||!c&&y!==b)&&this.setState(v)}this.runAnimation(vr(vr({},this.props),{},{from:b,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var o=this,s=i.from,l=i.to,c=i.duration,f=i.easing,h=i.begin,p=i.onAnimationEnd,y=i.onAnimationStart,g=Bse(s,l,Tse(f),c,this.changeStyle),S=function(){o.stopJSAnimation=g()};this.manager.start([y,h,S,c,p])}},{key:"runStepAnimation",value:function(i){var o=this,s=i.steps,l=i.begin,c=i.onAnimationStart,f=s[0],h=f.style,p=f.duration,y=p===void 0?0:p,g=function(b,v,w){if(w===0)return b;var A=v.duration,O=v.easing,T=O===void 0?"ease":O,P=v.style,C=v.properties,k=v.onAnimationEnd,j=w>0?s[w-1]:v,N=C||Object.keys(P);if(typeof T=="function"||T==="spring")return[].concat(ex(b),[o.runJSAnimation.bind(o,{from:j.style,to:P,duration:A,easing:T}),A]);var U=UN(N,A,T),L=vr(vr(vr({},j.style),P),{},{transition:U});return[].concat(ex(b),[L,A,k]).filter(yse)};return this.manager.start([c].concat(ex(s.reduce(g,[h,Math.max(y,l)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=dse());var o=i.begin,s=i.duration,l=i.attributeName,c=i.to,f=i.easing,h=i.onAnimationStart,p=i.onAnimationEnd,y=i.steps,g=i.children,S=this.manager;if(this.unSubscribe=S.subscribe(this.handleStyleChange),typeof f=="function"||typeof g=="function"||f==="spring"){this.runJSAnimation(i);return}if(y.length>1){this.runStepAnimation(i);return}var b=l?Tu({},l,c):c,v=UN(Object.keys(b),s,f);S.start([h,o,vr(vr({},b),{},{transition:v}),s,p])}},{key:"render",value:function(){var i=this.props,o=i.children;i.begin;var s=i.duration;i.attributeName,i.easing;var l=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var c=Use(i,Fse),f=M.Children.count(o),h=this.state.style;if(typeof o=="function")return o(h);if(!l||f===0||s<=0)return o;var p=function(g){var S=g.props,b=S.style,v=b===void 0?{}:b,w=S.className,A=M.cloneElement(g,vr(vr({},c),{},{style:vr(vr({},v),h),className:w}));return A};return f===1?p(M.Children.only(o)):z.createElement("div",null,M.Children.map(o,function(y){return p(y)}))}}]),n})(M.PureComponent);xi.displayName="Animate";xi.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};xi.propTypes={from:et.oneOfType([et.object,et.string]),to:et.oneOfType([et.object,et.string]),attributeName:et.string,duration:et.number,begin:et.number,easing:et.oneOfType([et.string,et.func]),steps:et.arrayOf(et.shape({duration:et.number.isRequired,style:et.object.isRequired,easing:et.oneOfType([et.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),et.func]),properties:et.arrayOf("string"),onAnimationEnd:et.func})),children:et.oneOfType([et.node,et.func]),isActive:et.bool,canBegin:et.bool,onAnimationEnd:et.func,shouldReAnimate:et.bool,onAnimationStart:et.func,onAnimationReStart:et.func};function xc(e){"@babel/helpers - typeof";return xc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xc(e)}function Hh(){return Hh=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0?1:-1,c=r>=0?1:-1,f=i>=0&&r>=0||i<0&&r<0?1:0,h;if(s>0&&o instanceof Array){for(var p=[0,0,0,0],y=0,g=4;ys?s:o[y];h="M".concat(t,",").concat(n+l*p[0]),p[0]>0&&(h+="A ".concat(p[0],",").concat(p[0],",0,0,").concat(f,",").concat(t+c*p[0],",").concat(n)),h+="L ".concat(t+r-c*p[1],",").concat(n),p[1]>0&&(h+="A ".concat(p[1],",").concat(p[1],",0,0,").concat(f,`, `).concat(t+r,",").concat(n+l*p[1])),h+="L ".concat(t+r,",").concat(n+i-l*p[2]),p[2]>0&&(h+="A ".concat(p[2],",").concat(p[2],",0,0,").concat(f,`, `).concat(t+r-c*p[2],",").concat(n+i)),h+="L ".concat(t+c*p[3],",").concat(n+i),p[3]>0&&(h+="A ".concat(p[3],",").concat(p[3],",0,0,").concat(f,`, `).concat(t,",").concat(n+i-l*p[3])),h+="Z"}else if(s>0&&o===+o&&o>0){var S=Math.min(s,o);h="M ".concat(t,",").concat(n+l*S,` A `).concat(S,",").concat(S,",0,0,").concat(f,",").concat(t+c*S,",").concat(n,` L `).concat(t+r-c*S,",").concat(n,` A `).concat(S,",").concat(S,",0,0,").concat(f,",").concat(t+r,",").concat(n+l*S,` L `).concat(t+r,",").concat(n+i-l*S,` A `).concat(S,",").concat(S,",0,0,").concat(f,",").concat(t+r-c*S,",").concat(n+i,` L `).concat(t+c*S,",").concat(n+i,` A `).concat(S,",").concat(S,",0,0,").concat(f,",").concat(t,",").concat(n+i-l*S," Z")}else h="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return h},lle=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,o=n.x,s=n.y,l=n.width,c=n.height;if(Math.abs(l)>0&&Math.abs(c)>0){var f=Math.min(o,o+l),h=Math.max(o,o+l),p=Math.min(s,s+c),y=Math.max(s,s+c);return r>=f&&r<=h&&i>=p&&i<=y}return!1},ule={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},I_=function(t){var n=QN(QN({},ule),t),r=M.useRef(),i=M.useState(-1),o=ele(i,2),s=o[0],l=o[1];M.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var T=r.current.getTotalLength();T&&l(T)}catch{}},[]);var c=n.x,f=n.y,h=n.width,p=n.height,y=n.radius,g=n.className,S=n.animationEasing,b=n.animationDuration,v=n.animationBegin,w=n.isAnimationActive,A=n.isUpdateAnimationActive;if(c!==+c||f!==+f||h!==+h||p!==+p||h===0||p===0)return null;var O=We("recharts-rectangle",g);return A?z.createElement(xi,{canBegin:s>0,from:{width:h,height:p,x:c,y:f},to:{width:h,height:p,x:c,y:f},duration:b,animationEasing:S,isActive:A},function(T){var P=T.width,C=T.height,k=T.x,j=T.y;return z.createElement(xi,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:b,isActive:w,easing:S},z.createElement("path",Hh({},Fe(n,!0),{className:O,d:XN(k,j,P,C,y),ref:r})))}):z.createElement("path",Hh({},Fe(n,!0),{className:O,d:XN(c,f,h,p,y)}))};function d1(){return d1=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function yle(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var vle=function(t,n,r,i,o,s){return"M".concat(t,",").concat(o,"v").concat(i,"M").concat(s,",").concat(n,"h").concat(r)},gle=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,s=t.top,l=s===void 0?0:s,c=t.left,f=c===void 0?0:c,h=t.width,p=h===void 0?0:h,y=t.height,g=y===void 0?0:y,S=t.className,b=mle(t,cle),v=fle({x:r,y:o,top:l,left:f,width:p,height:g},b);return!de(r)||!de(o)||!de(p)||!de(g)||!de(l)||!de(f)?null:z.createElement("path",h1({},Fe(v,!0),{className:We("recharts-cross",S),d:vle(r,o,p,g,l,f)}))},tx,ZN;function ble(){if(ZN)return tx;ZN=1;var e=LB(),t=e(Object.getPrototypeOf,Object);return tx=t,tx}var nx,JN;function xle(){if(JN)return nx;JN=1;var e=wi(),t=ble(),n=Si(),r="[object Object]",i=Function.prototype,o=Object.prototype,s=i.toString,l=o.hasOwnProperty,c=s.call(Object);function f(h){if(!n(h)||e(h)!=r)return!1;var p=t(h);if(p===null)return!0;var y=l.call(p,"constructor")&&p.constructor;return typeof y=="function"&&y instanceof y&&s.call(y)==c}return nx=f,nx}var wle=xle();const Sle=rt(wle);var rx,e2;function _le(){if(e2)return rx;e2=1;var e=wi(),t=Si(),n="[object Boolean]";function r(i){return i===!0||i===!1||t(i)&&e(i)==n}return rx=r,rx}var Ale=_le();const Ole=rt(Ale);function Sc(e){"@babel/helpers - typeof";return Sc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sc(e)}function Kh(){return Kh=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,from:{upperWidth:0,lowerWidth:0,height:y,x:c,y:f},to:{upperWidth:h,lowerWidth:p,height:y,x:c,y:f},duration:b,animationEasing:S,isActive:w},function(O){var T=O.upperWidth,P=O.lowerWidth,C=O.height,k=O.x,j=O.y;return z.createElement(xi,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:b,easing:S},z.createElement("path",Kh({},Fe(n,!0),{className:A,d:i2(k,j,T,P,C),ref:r})))}):z.createElement("g",null,z.createElement("path",Kh({},Fe(n,!0),{className:A,d:i2(c,f,h,p,y)})))},Dle=["option","shapeType","propTransformer","activeClassName","isActive"];function _c(e){"@babel/helpers - typeof";return _c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_c(e)}function Lle(e,t){if(e==null)return{};var n=$le(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $le(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function o2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Gh(e){for(var t=1;t0&&r.handleDrag(i.changedTouches[0])}),$n(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,o=i.endIndex,s=i.onDragEnd,l=i.startIndex;s==null||s({endIndex:o,startIndex:l})}),r.detachDragEndListener()}),$n(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),$n(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),$n(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),$n(r,"handleSlideDragStart",function(i){var o=m2(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return due(t,e),lue(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,o=r.endX,s=this.state.scaleValues,l=this.props,c=l.gap,f=l.data,h=f.length-1,p=Math.min(i,o),y=Math.max(i,o),g=t.getIndexInRange(s,p),S=t.getIndexInRange(s,y);return{startIndex:g-g%c,endIndex:S===h?h:S-S%c}}},{key:"getTextOfTick",value:function(r){var i=this.props,o=i.data,s=i.tickFormatter,l=i.dataKey,c=Vn(o[r],l,r);return Le(s)?s(c,r):c}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,o=i.slideMoveStartX,s=i.startX,l=i.endX,c=this.props,f=c.x,h=c.width,p=c.travellerWidth,y=c.startIndex,g=c.endIndex,S=c.onChange,b=r.pageX-o;b>0?b=Math.min(b,f+h-p-l,f+h-p-s):b<0&&(b=Math.max(b,f-s,f-l));var v=this.getIndex({startX:s+b,endX:l+b});(v.startIndex!==y||v.endIndex!==g)&&S&&S(v),this.setState({startX:s+b,endX:l+b,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var o=m2(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,o=i.brushMoveStartX,s=i.movingTravellerId,l=i.endX,c=i.startX,f=this.state[s],h=this.props,p=h.x,y=h.width,g=h.travellerWidth,S=h.onChange,b=h.gap,v=h.data,w={startX:this.state.startX,endX:this.state.endX},A=r.pageX-o;A>0?A=Math.min(A,p+y-g-f):A<0&&(A=Math.max(A,p-f)),w[s]=f+A;var O=this.getIndex(w),T=O.startIndex,P=O.endIndex,C=function(){var j=v.length-1;return s==="startX"&&(l>c?T%b===0:P%b===0)||lc?P%b===0:T%b===0)||l>c&&P===j};this.setState($n($n({},s,f+A),"brushMoveStartX",r.pageX),function(){S&&C()&&S(O)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var o=this,s=this.state,l=s.scaleValues,c=s.startX,f=s.endX,h=this.state[i],p=l.indexOf(h);if(p!==-1){var y=p+r;if(!(y===-1||y>=l.length)){var g=l[y];i==="startX"&&g>=f||i==="endX"&&g<=c||this.setState($n({},i,g),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,o=r.y,s=r.width,l=r.height,c=r.fill,f=r.stroke;return z.createElement("rect",{stroke:f,fill:c,x:i,y:o,width:s,height:l})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,o=r.y,s=r.width,l=r.height,c=r.data,f=r.children,h=r.padding,p=M.Children.only(f);return p?z.cloneElement(p,{x:i,y:o,width:s,height:l,margin:h,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(r,i){var o,s,l=this,c=this.props,f=c.y,h=c.travellerWidth,p=c.height,y=c.traveller,g=c.ariaLabel,S=c.data,b=c.startIndex,v=c.endIndex,w=Math.max(r,this.props.x),A=lx(lx({},Fe(this.props,!1)),{},{x:w,y:f,width:h,height:p}),O=g||"Min value: ".concat((o=S[b])===null||o===void 0?void 0:o.name,", Max value: ").concat((s=S[v])===null||s===void 0?void 0:s.name);return z.createElement(bt,{tabIndex:0,role:"slider","aria-label":O,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(P){["ArrowLeft","ArrowRight"].includes(P.key)&&(P.preventDefault(),P.stopPropagation(),l.handleTravellerMoveKeyboard(P.key==="ArrowRight"?1:-1,i))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(y,A))}},{key:"renderSlide",value:function(r,i){var o=this.props,s=o.y,l=o.height,c=o.stroke,f=o.travellerWidth,h=Math.min(r,i)+f,p=Math.max(Math.abs(i-r)-f,0);return z.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:h,y:s,width:p,height:l})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,o=r.endIndex,s=r.y,l=r.height,c=r.travellerWidth,f=r.stroke,h=this.state,p=h.startX,y=h.endX,g=5,S={pointerEvents:"none",fill:f};return z.createElement(bt,{className:"recharts-brush-texts"},z.createElement(Ah,Xh({textAnchor:"end",verticalAnchor:"middle",x:Math.min(p,y)-g,y:s+l/2},S),this.getTextOfTick(i)),z.createElement(Ah,Xh({textAnchor:"start",verticalAnchor:"middle",x:Math.max(p,y)+c+g,y:s+l/2},S),this.getTextOfTick(o)))}},{key:"render",value:function(){var r=this.props,i=r.data,o=r.className,s=r.children,l=r.x,c=r.y,f=r.width,h=r.height,p=r.alwaysShowText,y=this.state,g=y.startX,S=y.endX,b=y.isTextActive,v=y.isSlideMoving,w=y.isTravellerMoving,A=y.isTravellerFocused;if(!i||!i.length||!de(l)||!de(c)||!de(f)||!de(h)||f<=0||h<=0)return null;var O=We("recharts-brush",o),T=z.Children.count(s)===1,P=aue("userSelect","none");return z.createElement(bt,{className:O,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:P},this.renderBackground(),T&&this.renderPanorama(),this.renderSlide(g,S),this.renderTravellerLayer(g,"startX"),this.renderTravellerLayer(S,"endX"),(b||v||w||A||p)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,o=r.y,s=r.width,l=r.height,c=r.stroke,f=Math.floor(o+l/2)-1;return z.createElement(z.Fragment,null,z.createElement("rect",{x:i,y:o,width:s,height:l,fill:c,stroke:"none"}),z.createElement("line",{x1:i+1,y1:f,x2:i+s-1,y2:f,fill:"none",stroke:"#fff"}),z.createElement("line",{x1:i+1,y1:f+2,x2:i+s-1,y2:f+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var o;return z.isValidElement(r)?o=z.cloneElement(r,i):Le(r)?o=r(i):o=t.renderDefaultTraveller(i),o}},{key:"getDerivedStateFromProps",value:function(r,i){var o=r.data,s=r.width,l=r.x,c=r.travellerWidth,f=r.updateId,h=r.startIndex,p=r.endIndex;if(o!==i.prevData||f!==i.prevUpdateId)return lx({prevData:o,prevTravellerWidth:c,prevUpdateId:f,prevX:l,prevWidth:s},o&&o.length?pue({data:o,width:s,x:l,travellerWidth:c,startIndex:h,endIndex:p}):{scale:null,scaleValues:null});if(i.scale&&(s!==i.prevWidth||l!==i.prevX||c!==i.prevTravellerWidth)){i.scale.range([l,l+s-c]);var y=i.scale.domain().map(function(g){return i.scale(g)});return{prevData:o,prevTravellerWidth:c,prevUpdateId:f,prevX:l,prevWidth:s,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:y}}return null}},{key:"getIndexInRange",value:function(r,i){for(var o=r.length,s=0,l=o-1;l-s>1;){var c=Math.floor((s+l)/2);r[c]>i?l=c:s=c}return i>=r[l]?l:s}}])})(M.PureComponent);$n(Ws,"displayName","Brush");$n(Ws,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var ux,y2;function mue(){if(y2)return ux;y2=1;var e=s_();function t(n,r){var i;return e(n,function(o,s,l){return i=r(o,s,l),!i}),!!i}return ux=t,ux}var cx,v2;function yue(){if(v2)return cx;v2=1;var e=kB(),t=vo(),n=mue(),r=jn(),i=Np();function o(s,l,c){var f=r(s)?e:n;return c&&i(s,l,c)&&(l=void 0),f(s,t(l,3))}return cx=o,cx}var vue=yue();const gue=rt(vue);var zr=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},fx,g2;function bue(){if(g2)return fx;g2=1;var e=GB();function t(n,r,i){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[r]=i}return fx=t,fx}var dx,b2;function xue(){if(b2)return dx;b2=1;var e=bue(),t=HB(),n=vo();function r(i,o){var s={};return o=n(o,3),t(i,function(l,c,f){e(s,c,o(l,c,f))}),s}return dx=r,dx}var wue=xue();const Sue=rt(wue);var hx,x2;function _ue(){if(x2)return hx;x2=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jue(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Mue(e,t){var n=e.x,r=e.y,i=Rue(e,Eue),o="".concat(n),s=parseInt(o,10),l="".concat(r),c=parseInt(l,10),f="".concat(t.height||i.height),h=parseInt(f,10),p="".concat(t.width||i.width),y=parseInt(p,10);return vu(vu(vu(vu(vu({},t),i),s?{x:s}:{}),c?{y:c}:{}),{},{height:h,width:y,name:t.name,radius:t.radius})}function A2(e){return z.createElement(Wle,m1({shapeType:"rectangle",propTransformer:Mue,activeClassName:"recharts-active-bar"},e))}var Nue=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var o=de(r)||BX(r);return o?t(r,i):(o||xa(),n)}},Iue=["value","background"],S3;function Hs(e){"@babel/helpers - typeof";return Hs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hs(e)}function Due(e,t){if(e==null)return{};var n=Lue(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Lue(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Zh(){return Zh=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(X)0&&Math.abs(F)0&&(G=Math.min((he||0)-(F[me-1]||0),G))}),Number.isFinite(G)){var X=G/$,J=b.layout==="vertical"?r.height:r.width;if(b.padding==="gap"&&(k=X*J/2),b.padding==="no-gap"){var ee=ga(t.barCategoryGap,X*J),Q=X*J/2;k=Q-ee-(Q-ee)/J*ee}}}i==="xAxis"?j=[r.left+(O.left||0)+(k||0),r.left+r.width-(O.right||0)-(k||0)]:i==="yAxis"?j=c==="horizontal"?[r.top+r.height-(O.bottom||0),r.top+(O.top||0)]:[r.top+(O.top||0)+(k||0),r.top+r.height-(O.bottom||0)-(k||0)]:j=b.range,P&&(j=[j[1],j[0]]);var ne=roe(b,o,y),V=ne.scale,D=ne.realScaleType;V.domain(w).range(j),ioe(V);var K=doe(V,Sr(Sr({},b),{},{realScaleType:D}));i==="xAxis"?(L=v==="top"&&!T||v==="bottom"&&T,N=r.left,U=p[C]-L*b.height):i==="yAxis"&&(L=v==="left"&&!T||v==="right"&&T,N=p[C]-L*b.width,U=r.top);var ae=Sr(Sr(Sr({},b),K),{},{realScaleType:D,x:N,y:U,scale:V,width:i==="xAxis"?r.width:b.width,height:i==="yAxis"?r.height:b.height});return ae.bandSize=Bh(ae,K),!b.hide&&i==="xAxis"?p[C]+=(L?-1:1)*ae.height:b.hide||(p[C]+=(L?-1:1)*ae.width),Sr(Sr({},g),{},Kp({},S,ae))},{})},P3=function(t,n){var r=t.x,i=t.y,o=n.x,s=n.y;return{x:Math.min(r,o),y:Math.min(i,s),width:Math.abs(o-r),height:Math.abs(s-i)}},Que=function(t){var n=t.x1,r=t.y1,i=t.x2,o=t.y2;return P3({x:n,y:r},{x:i,y:o})},E3=(function(){function e(t){Wue(this,e),this.scale=t}return Hue(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,o=r.position;if(n!==void 0){if(o)switch(o){case"start":return this.scale(n);case"middle":{var s=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+s}case"end":{var l=this.bandwidth?this.bandwidth():0;return this.scale(n)+l}default:return this.scale(n)}if(i){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+c}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],o=r[r.length-1];return i<=o?n>=i&&n<=o:n>=o&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])})();Kp(E3,"EPS",1e-4);var L_=function(t){var n=Object.keys(t).reduce(function(r,i){return Sr(Sr({},r),{},Kp({},i,E3.create(t[i])))},{});return Sr(Sr({},n),{},{apply:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=o.bandAware,l=o.position;return Sue(i,function(c,f){return n[f].apply(c,{bandAware:s,position:l})})},isInRange:function(i){return w3(i,function(o,s){return n[s].isInRange(o)})}})};function Xue(e){return(e%180+180)%180}var Yue=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=Xue(i),s=o*Math.PI/180,l=Math.atan(r/n),c=s>l&&s-1?c[f?o[h]:h]:void 0}}return yx=r,yx}var vx,k2;function Jue(){if(k2)return vx;k2=1;var e=v3();function t(n){var r=e(n),i=r%1;return r===r?i?r-i:r:0}return vx=t,vx}var gx,R2;function ece(){if(R2)return gx;R2=1;var e=UB(),t=vo(),n=Jue(),r=Math.max;function i(o,s,l){var c=o==null?0:o.length;if(!c)return-1;var f=l==null?0:n(l);return f<0&&(f=r(c+f,0)),e(o,t(s,3),f)}return gx=i,gx}var bx,j2;function tce(){if(j2)return bx;j2=1;var e=Zue(),t=ece(),n=e(t);return bx=n,bx}var nce=tce();const rce=rt(nce);var ice=rB();const oce=rt(ice);var ace=oce(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),$_=M.createContext(void 0),B_=M.createContext(void 0),T3=M.createContext(void 0),C3=M.createContext({}),k3=M.createContext(void 0),R3=M.createContext(0),j3=M.createContext(0),M2=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,o=n.offset,s=t.clipPathId,l=t.children,c=t.width,f=t.height,h=ace(o);return z.createElement($_.Provider,{value:r},z.createElement(B_.Provider,{value:i},z.createElement(C3.Provider,{value:o},z.createElement(T3.Provider,{value:h},z.createElement(k3.Provider,{value:s},z.createElement(R3.Provider,{value:f},z.createElement(j3.Provider,{value:c},l)))))))},sce=function(){return M.useContext(k3)},M3=function(t){var n=M.useContext($_);n==null&&xa();var r=n[t];return r==null&&xa(),r},lce=function(){var t=M.useContext($_);return Qi(t)},uce=function(){var t=M.useContext(B_),n=rce(t,function(r){return w3(r.domain,Number.isFinite)});return n||Qi(t)},N3=function(t){var n=M.useContext(B_);n==null&&xa();var r=n[t];return r==null&&xa(),r},cce=function(){var t=M.useContext(T3);return t},fce=function(){return M.useContext(C3)},F_=function(){return M.useContext(j3)},U_=function(){return M.useContext(R3)};function Ks(e){"@babel/helpers - typeof";return Ks=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ks(e)}function dce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hce(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function Gce(e,t){return U3(e,t+1)}function Qce(e,t,n,r,i){for(var o=(r||[]).slice(),s=t.start,l=t.end,c=0,f=1,h=s,p=function(){var S=r==null?void 0:r[c];if(S===void 0)return{v:U3(r,f)};var b=c,v,w=function(){return v===void 0&&(v=n(S,b)),v},A=S.coordinate,O=c===0||rp(e,A,w,h,l);O||(c=0,h=s,f+=1),O&&(h=A+e*(w()/2+i),c+=f)},y;f<=o.length;)if(y=p(),y)return y.v;return[]}function Tc(e){"@babel/helpers - typeof";return Tc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tc(e)}function U2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function fn(e){for(var t=1;t0?g.coordinate-v*e:g.coordinate})}else o[y]=g=fn(fn({},g),{},{tickCoord:g.coordinate});var w=rp(e,g.tickCoord,b,l,c);w&&(c=g.tickCoord-e*(b()/2+i),o[y]=fn(fn({},g),{},{isShow:!0}))},h=s-1;h>=0;h--)f(h);return o}function efe(e,t,n,r,i,o){var s=(r||[]).slice(),l=s.length,c=t.start,f=t.end;if(o){var h=r[l-1],p=n(h,l-1),y=e*(h.coordinate+e*p/2-f);s[l-1]=h=fn(fn({},h),{},{tickCoord:y>0?h.coordinate-y*e:h.coordinate});var g=rp(e,h.tickCoord,function(){return p},c,f);g&&(f=h.tickCoord-e*(p/2+i),s[l-1]=fn(fn({},h),{},{isShow:!0}))}for(var S=o?l-1:l,b=function(A){var O=s[A],T,P=function(){return T===void 0&&(T=n(O,A)),T};if(A===0){var C=e*(O.coordinate-e*P()/2-c);s[A]=O=fn(fn({},O),{},{tickCoord:C<0?O.coordinate-C*e:O.coordinate})}else s[A]=O=fn(fn({},O),{},{tickCoord:O.coordinate});var k=rp(e,O.tickCoord,P,c,f);k&&(c=O.tickCoord+e*(P()/2+i),s[A]=fn(fn({},O),{},{isShow:!0}))},v=0;v=2?Ar(i[1].coordinate-i[0].coordinate):1,w=Kce(o,v,g);return c==="equidistantPreserveStart"?Qce(v,w,b,i,s):(c==="preserveStart"||c==="preserveStartEnd"?y=efe(v,w,b,i,s,c==="preserveStartEnd"):y=Jce(v,w,b,i,s),y.filter(function(A){return A.isShow}))}var tfe=["viewBox"],nfe=["viewBox"],rfe=["ticks"];function Xs(e){"@babel/helpers - typeof";return Xs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xs(e)}function cs(){return cs=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ife(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ofe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z2(e,t){for(var n=0;n0?c(this.props):c(g)),s<=0||l<=0||!S||!S.length?null:z.createElement(bt,{className:We("recharts-cartesian-axis",f),ref:function(v){r.layerReference=v}},o&&this.renderAxisLine(),this.renderTicks(S,this.state.fontSize,this.state.letterSpacing),dn.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,o){var s,l=We(i.className,"recharts-cartesian-axis-tick-value");return z.isValidElement(r)?s=z.cloneElement(r,Dt(Dt({},i),{},{className:l})):Le(r)?s=r(Dt(Dt({},i),{},{className:l})):s=z.createElement(Ah,cs({},i,{className:"recharts-cartesian-axis-tick-value"}),o),s}}])})(M.Component);W_(yl,"displayName","CartesianAxis");W_(yl,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var dfe=["x1","y1","x2","y2","key"],hfe=["offset"];function wa(e){"@babel/helpers - typeof";return wa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wa(e)}function V2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function hn(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vfe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var gfe=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,o=t.y,s=t.width,l=t.height,c=t.ry;return z.createElement("rect",{x:i,y:o,ry:c,width:s,height:l,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function V3(e,t){var n;if(z.isValidElement(e))n=z.cloneElement(e,t);else if(Le(e))n=e(t);else{var r=t.x1,i=t.y1,o=t.x2,s=t.y2,l=t.key,c=W2(t,dfe),f=Fe(c,!1);f.offset;var h=W2(f,hfe);n=z.createElement("line",Xo({},h,{x1:r,y1:i,x2:o,y2:s,fill:"none",key:l}))}return n}function bfe(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,o=e.horizontalPoints;if(!i||!o||!o.length)return null;var s=o.map(function(l,c){var f=hn(hn({},e),{},{x1:t,y1:l,x2:t+n,y2:l,key:"line-".concat(c),index:c});return V3(i,f)});return z.createElement("g",{className:"recharts-cartesian-grid-horizontal"},s)}function xfe(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,o=e.verticalPoints;if(!i||!o||!o.length)return null;var s=o.map(function(l,c){var f=hn(hn({},e),{},{x1:l,y1:t,x2:l,y2:t+n,key:"line-".concat(c),index:c});return V3(i,f)});return z.createElement("g",{className:"recharts-cartesian-grid-vertical"},s)}function wfe(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,o=e.width,s=e.height,l=e.horizontalPoints,c=e.horizontal,f=c===void 0?!0:c;if(!f||!t||!t.length)return null;var h=l.map(function(y){return Math.round(y+i-i)}).sort(function(y,g){return y-g});i!==h[0]&&h.unshift(0);var p=h.map(function(y,g){var S=!h[g+1],b=S?i+s-y:h[g+1]-y;if(b<=0)return null;var v=g%t.length;return z.createElement("rect",{key:"react-".concat(g),y,x:r,height:b,width:o,stroke:"none",fill:t[v],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return z.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},p)}function Sfe(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,o=e.x,s=e.y,l=e.width,c=e.height,f=e.verticalPoints;if(!n||!r||!r.length)return null;var h=f.map(function(y){return Math.round(y+o-o)}).sort(function(y,g){return y-g});o!==h[0]&&h.unshift(0);var p=h.map(function(y,g){var S=!h[g+1],b=S?o+l-y:h[g+1]-y;if(b<=0)return null;var v=g%r.length;return z.createElement("rect",{key:"react-".concat(g),x:y,y:s,width:b,height:c,stroke:"none",fill:r[v],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return z.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},p)}var _fe=function(t,n){var r=t.xAxis,i=t.width,o=t.height,s=t.offset;return i3(V_(hn(hn(hn({},yl.defaultProps),r),{},{ticks:ci(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),s.left,s.left+s.width,n)},Afe=function(t,n){var r=t.yAxis,i=t.width,o=t.height,s=t.offset;return i3(V_(hn(hn(hn({},yl.defaultProps),r),{},{ticks:ci(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),s.top,s.top+s.height,n)},rs={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function W3(e){var t,n,r,i,o,s,l=F_(),c=U_(),f=fce(),h=hn(hn({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:rs.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:rs.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:rs.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:rs.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:rs.vertical,verticalFill:(s=e.verticalFill)!==null&&s!==void 0?s:rs.verticalFill,x:de(e.x)?e.x:f.left,y:de(e.y)?e.y:f.top,width:de(e.width)?e.width:f.width,height:de(e.height)?e.height:f.height}),p=h.x,y=h.y,g=h.width,S=h.height,b=h.syncWithTicks,v=h.horizontalValues,w=h.verticalValues,A=lce(),O=uce();if(!de(g)||g<=0||!de(S)||S<=0||!de(p)||p!==+p||!de(y)||y!==+y)return null;var T=h.verticalCoordinatesGenerator||_fe,P=h.horizontalCoordinatesGenerator||Afe,C=h.horizontalPoints,k=h.verticalPoints;if((!C||!C.length)&&Le(P)){var j=v&&v.length,N=P({yAxis:O?hn(hn({},O),{},{ticks:j?v:O.ticks}):void 0,width:l,height:c,offset:f},j?!0:b);pi(Array.isArray(N),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(wa(N),"]")),Array.isArray(N)&&(C=N)}if((!k||!k.length)&&Le(T)){var U=w&&w.length,L=T({xAxis:A?hn(hn({},A),{},{ticks:U?w:A.ticks}):void 0,width:l,height:c,offset:f},U?!0:b);pi(Array.isArray(L),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(wa(L),"]")),Array.isArray(L)&&(k=L)}return z.createElement("g",{className:"recharts-cartesian-grid"},z.createElement(gfe,{fill:h.fill,fillOpacity:h.fillOpacity,x:h.x,y:h.y,width:h.width,height:h.height,ry:h.ry}),z.createElement(bfe,Xo({},h,{offset:f,horizontalPoints:C,xAxis:A,yAxis:O})),z.createElement(xfe,Xo({},h,{offset:f,verticalPoints:k,xAxis:A,yAxis:O})),z.createElement(wfe,Xo({},h,{horizontalPoints:C})),z.createElement(Sfe,Xo({},h,{verticalPoints:k})))}W3.displayName="CartesianGrid";var Ofe=["layout","type","stroke","connectNulls","isRange","ref"],Pfe=["key"],H3;function Ys(e){"@babel/helpers - typeof";return Ys=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ys(e)}function K3(e,t){if(e==null)return{};var n=Efe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Efe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Yo(){return Yo=Object.assign?Object.assign.bind():function(e){for(var t=1;t0||!sc(h,s)||!sc(p,l))?this.renderAreaWithAnimation(r,i):this.renderAreaStatically(s,l,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,s=i.dot,l=i.points,c=i.className,f=i.top,h=i.left,p=i.xAxis,y=i.yAxis,g=i.width,S=i.height,b=i.isAnimationActive,v=i.id;if(o||!l||!l.length)return null;var w=this.state.isAnimationFinished,A=l.length===1,O=We("recharts-area",c),T=p&&p.allowDataOverflow,P=y&&y.allowDataOverflow,C=T||P,k=Ue(v)?this.id:v,j=(r=Fe(s,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},N=j.r,U=N===void 0?3:N,L=j.strokeWidth,$=L===void 0?2:L,G=YX(s)?s:{},F=G.clipDot,X=F===void 0?!0:F,J=U*2+$;return z.createElement(bt,{className:O},T||P?z.createElement("defs",null,z.createElement("clipPath",{id:"clipPath-".concat(k)},z.createElement("rect",{x:T?h:h-g/2,y:P?f:f-S/2,width:T?g:g*2,height:P?S:S*2})),!X&&z.createElement("clipPath",{id:"clipPath-dots-".concat(k)},z.createElement("rect",{x:h-J/2,y:f-J/2,width:g+J,height:S+J}))):null,A?null:this.renderArea(C,k),(s||A)&&this.renderDots(C,X,k),(!b||w)&&co.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:r.points!==i.curPoints||r.baseLine!==i.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])})(M.PureComponent);H3=wo;$r(wo,"displayName","Area");$r(wo,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!dl.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});$r(wo,"getBaseValue",function(e,t,n,r){var i=e.layout,o=e.baseValue,s=t.props.baseValue,l=s??o;if(de(l)&&typeof l=="number")return l;var c=i==="horizontal"?r:n,f=c.scale.domain();if(c.type==="number"){var h=Math.max(f[0],f[1]),p=Math.min(f[0],f[1]);return l==="dataMin"?p:l==="dataMax"||h<0?h:Math.max(Math.min(f[0],f[1]),0)}return l==="dataMin"?f[0]:l==="dataMax"?f[1]:f[0]});$r(wo,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,i=e.yAxis,o=e.xAxisTicks,s=e.yAxisTicks,l=e.bandSize,c=e.dataKey,f=e.stackedData,h=e.dataStartIndex,p=e.displayedData,y=e.offset,g=t.layout,S=f&&f.length,b=H3.getBaseValue(t,n,r,i),v=g==="horizontal",w=!1,A=p.map(function(T,P){var C;S?C=f[h+P]:(C=Vn(T,c),Array.isArray(C)?w=!0:C=[b,C]);var k=C[1]==null||S&&Vn(T,c)==null;return v?{x:fN({axis:r,ticks:o,bandSize:l,entry:T,index:P}),y:k?null:i.scale(C[1]),value:C,payload:T}:{x:k?null:r.scale(C[1]),y:fN({axis:i,ticks:s,bandSize:l,entry:T,index:P}),value:C,payload:T}}),O;return S||w?O=A.map(function(T){var P=Array.isArray(T.value)?T.value[0]:null;return v?{x:T.x,y:P!=null&&T.y!=null?i.scale(P):null}:{x:P!=null?r.scale(P):null,y:T.y}}):O=v?i.scale(b):r.scale(b),Ki({points:A,baseLine:O,layout:g,isRange:w},y)});$r(wo,"renderDotItem",function(e,t){var n;if(z.isValidElement(e))n=z.cloneElement(e,t);else if(Le(e))n=e(t);else{var r=We("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,o=K3(t,Pfe);n=z.createElement(D_,Yo({},o,{key:i,className:r}))}return n});function Zs(e){"@babel/helpers - typeof";return Zs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zs(e)}function Ife(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dfe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _de(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Ade(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ode(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?s:t&&t.length&&de(i)&&de(o)?t.slice(i,o+1):[]};function l4(e){return e==="number"?[0,"auto"]:void 0}var M1=function(t,n,r,i){var o=t.graphicalItems,s=t.tooltipAxis,l=em(n,t);return r<0||!o||!o.length||r>=l.length?null:o.reduce(function(c,f){var h,p=(h=f.props.data)!==null&&h!==void 0?h:n;p&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(p=p.slice(t.dataStartIndex,t.dataEndIndex+1));var y;if(s.dataKey&&!s.allowDuplicatedCategory){var g=p===void 0?l:p;y=fh(g,s.dataKey,i)}else y=p&&p[r]||l[r];return y?[].concat(tl(c),[a3(f,y)]):c},[])},eI=function(t,n,r,i){var o=i||{x:t.chartX,y:t.chartY},s=Lde(o,r),l=t.orderedTooltipTicks,c=t.tooltipAxis,f=t.tooltipTicks,h=Yie(s,l,f,c);if(h>=0&&f){var p=f[h]&&f[h].value,y=M1(t,n,h,p),g=$de(r,l,h,o);return{activeTooltipIndex:h,activeLabel:p,activePayload:y,activeCoordinate:g}}return null},Bde=function(t,n){var r=n.axes,i=n.graphicalItems,o=n.axisType,s=n.axisIdKey,l=n.stackGroups,c=n.dataStartIndex,f=n.dataEndIndex,h=t.layout,p=t.children,y=t.stackOffset,g=r3(h,o);return r.reduce(function(S,b){var v,w=b.type.defaultProps!==void 0?re(re({},b.type.defaultProps),b.props):b.props,A=w.type,O=w.dataKey,T=w.allowDataOverflow,P=w.allowDuplicatedCategory,C=w.scale,k=w.ticks,j=w.includeHidden,N=w[s];if(S[N])return S;var U=em(t.data,{graphicalItems:i.filter(function(K){var ae,he=s in K.props?K.props[s]:(ae=K.type.defaultProps)===null||ae===void 0?void 0:ae[s];return he===N}),dataStartIndex:c,dataEndIndex:f}),L=U.length,$,G,F;fde(w.domain,T,A)&&($=Zw(w.domain,null,T),g&&(A==="number"||C!=="auto")&&(F=Lu(U,O,"category")));var X=l4(A);if(!$||$.length===0){var J,ee=(J=w.domain)!==null&&J!==void 0?J:X;if(O){if($=Lu(U,O,A),A==="category"&&g){var Q=UX($);P&&Q?(G=$,$=Qh(0,L)):P||($=mN(ee,$,b).reduce(function(K,ae){return K.indexOf(ae)>=0?K:[].concat(tl(K),[ae])},[]))}else if(A==="category")P?$=$.filter(function(K){return K!==""&&!Ue(K)}):$=mN(ee,$,b).reduce(function(K,ae){return K.indexOf(ae)>=0||ae===""||Ue(ae)?K:[].concat(tl(K),[ae])},[]);else if(A==="number"){var ne=noe(U,i.filter(function(K){var ae,he,me=s in K.props?K.props[s]:(ae=K.type.defaultProps)===null||ae===void 0?void 0:ae[s],ce="hide"in K.props?K.props.hide:(he=K.type.defaultProps)===null||he===void 0?void 0:he.hide;return me===N&&(j||!ce)}),O,o,h);ne&&($=ne)}g&&(A==="number"||C!=="auto")&&(F=Lu(U,O,"category"))}else g?$=Qh(0,L):l&&l[N]&&l[N].hasStack&&A==="number"?$=y==="expand"?[0,1]:o3(l[N].stackGroups,c,f):$=n3(U,i.filter(function(K){var ae=s in K.props?K.props[s]:K.type.defaultProps[s],he="hide"in K.props?K.props.hide:K.type.defaultProps.hide;return ae===N&&(j||!he)}),A,h,!0);if(A==="number")$=k1(p,$,N,o,k),ee&&($=Zw(ee,$,T));else if(A==="category"&&ee){var V=ee,D=$.every(function(K){return V.indexOf(K)>=0});D&&($=V)}}return re(re({},S),{},Me({},N,re(re({},w),{},{axisType:o,domain:$,categoricalDomain:F,duplicateDomain:G,originalDomain:(v=w.domain)!==null&&v!==void 0?v:X,isCategorical:g,layout:h})))},{})},Fde=function(t,n){var r=n.graphicalItems,i=n.Axis,o=n.axisType,s=n.axisIdKey,l=n.stackGroups,c=n.dataStartIndex,f=n.dataEndIndex,h=t.layout,p=t.children,y=em(t.data,{graphicalItems:r,dataStartIndex:c,dataEndIndex:f}),g=y.length,S=r3(h,o),b=-1;return r.reduce(function(v,w){var A=w.type.defaultProps!==void 0?re(re({},w.type.defaultProps),w.props):w.props,O=A[s],T=l4("number");if(!v[O]){b++;var P;return S?P=Qh(0,g):l&&l[O]&&l[O].hasStack?(P=o3(l[O].stackGroups,c,f),P=k1(p,P,O,o)):(P=Zw(T,n3(y,r.filter(function(C){var k,j,N=s in C.props?C.props[s]:(k=C.type.defaultProps)===null||k===void 0?void 0:k[s],U="hide"in C.props?C.props.hide:(j=C.type.defaultProps)===null||j===void 0?void 0:j.hide;return N===O&&!U}),"number",h),i.defaultProps.allowDataOverflow),P=k1(p,P,O,o)),re(re({},v),{},Me({},O,re(re({axisType:o},i.defaultProps),{},{hide:!0,orientation:sr(Ide,"".concat(o,".").concat(b%2),null),domain:P,originalDomain:T,isCategorical:S,layout:h})))}return v},{})},Ude=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,o=n.AxisComp,s=n.graphicalItems,l=n.stackGroups,c=n.dataStartIndex,f=n.dataEndIndex,h=t.children,p="".concat(i,"Id"),y=Or(h,o),g={};return y&&y.length?g=Bde(t,{axes:y,graphicalItems:s,axisType:i,axisIdKey:p,stackGroups:l,dataStartIndex:c,dataEndIndex:f}):s&&s.length&&(g=Fde(t,{Axis:o,graphicalItems:s,axisType:i,axisIdKey:p,stackGroups:l,dataStartIndex:c,dataEndIndex:f})),g},qde=function(t){var n=Qi(t),r=ci(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:l_(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Bh(n,r)}},tI=function(t){var n=t.children,r=t.defaultShowTooltip,i=Bn(n,Ws),o=0,s=0;return t.data&&t.data.length!==0&&(s=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(o=i.props.startIndex),i.props.endIndex>=0&&(s=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:s,activeTooltipIndex:-1,isTooltipActive:!!r}},zde=function(t){return!t||!t.length?!1:t.some(function(n){var r=hi(n&&n.type);return r&&r.indexOf("Bar")>=0})},nI=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},Vde=function(t,n){var r=t.props,i=t.graphicalItems,o=t.xAxisMap,s=o===void 0?{}:o,l=t.yAxisMap,c=l===void 0?{}:l,f=r.width,h=r.height,p=r.children,y=r.margin||{},g=Bn(p,Ws),S=Bn(p,ps),b=Object.keys(c).reduce(function(P,C){var k=c[C],j=k.orientation;return!k.mirror&&!k.hide?re(re({},P),{},Me({},j,P[j]+k.width)):P},{left:y.left||0,right:y.right||0}),v=Object.keys(s).reduce(function(P,C){var k=s[C],j=k.orientation;return!k.mirror&&!k.hide?re(re({},P),{},Me({},j,sr(P,"".concat(j))+k.height)):P},{top:y.top||0,bottom:y.bottom||0}),w=re(re({},v),b),A=w.bottom;g&&(w.bottom+=g.props.height||Ws.defaultProps.height),S&&n&&(w=eoe(w,i,r,n));var O=f-w.left-w.right,T=h-w.top-w.bottom;return re(re({brushBottom:A},w),{},{width:Math.max(O,0),height:Math.max(T,0)})},Wde=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},Hde=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,o=i===void 0?"axis":i,s=t.validateTooltipEventTypes,l=s===void 0?["axis"]:s,c=t.axisComponents,f=t.legendContent,h=t.formatAxisMap,p=t.defaultProps,y=function(w,A){var O=A.graphicalItems,T=A.stackGroups,P=A.offset,C=A.updateId,k=A.dataStartIndex,j=A.dataEndIndex,N=w.barSize,U=w.layout,L=w.barGap,$=w.barCategoryGap,G=w.maxBarSize,F=nI(U),X=F.numericAxisName,J=F.cateAxisName,ee=zde(O),Q=[];return O.forEach(function(ne,V){var D=em(w.data,{graphicalItems:[ne],dataStartIndex:k,dataEndIndex:j}),K=ne.type.defaultProps!==void 0?re(re({},ne.type.defaultProps),ne.props):ne.props,ae=K.dataKey,he=K.maxBarSize,me=K["".concat(X,"Id")],ce=K["".concat(J,"Id")],Ee={},Te=c.reduce(function(nn,Kt){var Ta=A["".concat(Kt.axisType,"Map")],vl=K["".concat(Kt.axisType,"Id")];Ta&&Ta[vl]||Kt.axisType==="zAxis"||xa();var gl=Ta[vl];return re(re({},nn),{},Me(Me({},Kt.axisType,gl),"".concat(Kt.axisType,"Ticks"),ci(gl)))},Ee),ie=Te[J],Oe=Te["".concat(J,"Ticks")],Ce=T&&T[me]&&T[me].hasStack&&poe(ne,T[me].stackGroups),oe=hi(ne.type).indexOf("Bar")>=0,He=Bh(ie,Oe),De=[],Ge=ee&&Zie({barSize:N,stackGroups:T,totalSize:Wde(Te,J)});if(oe){var xe,Qe,Tt=Ue(he)?G:he,Ft=(xe=(Qe=Bh(ie,Oe,!0))!==null&&Qe!==void 0?Qe:Tt)!==null&&xe!==void 0?xe:0;De=Jie({barGap:L,barCategoryGap:$,bandSize:Ft!==He?Ft:He,sizeList:Ge[ce],maxBarSize:Tt}),Ft!==He&&(De=De.map(function(nn){return re(re({},nn),{},{position:re(re({},nn.position),{},{offset:nn.position.offset-Ft/2})})}))}var Mn=ne&&ne.type&&ne.type.getComposedData;Mn&&Q.push({props:re(re({},Mn(re(re({},Te),{},{displayedData:D,props:w,dataKey:ae,item:ne,bandSize:He,barPosition:De,offset:P,stackedData:Ce,layout:U,dataStartIndex:k,dataEndIndex:j}))),{},Me(Me(Me({key:ne.key||"item-".concat(V)},X,Te[X]),J,Te[J]),"animationId",C)),childIndex:eY(ne,w.children),item:ne})}),Q},g=function(w,A){var O=w.props,T=w.dataStartIndex,P=w.dataEndIndex,C=w.updateId;if(!Ck({props:O}))return null;var k=O.children,j=O.layout,N=O.stackOffset,U=O.data,L=O.reverseStackOrder,$=nI(j),G=$.numericAxisName,F=$.cateAxisName,X=Or(k,r),J=foe(U,X,"".concat(G,"Id"),"".concat(F,"Id"),N,L),ee=c.reduce(function(K,ae){var he="".concat(ae.axisType,"Map");return re(re({},K),{},Me({},he,Ude(O,re(re({},ae),{},{graphicalItems:X,stackGroups:ae.axisType===G&&J,dataStartIndex:T,dataEndIndex:P}))))},{}),Q=Vde(re(re({},ee),{},{props:O,graphicalItems:X}),A==null?void 0:A.legendBBox);Object.keys(ee).forEach(function(K){ee[K]=h(O,ee[K],Q,K.replace("Map",""),n)});var ne=ee["".concat(F,"Map")],V=qde(ne),D=y(O,re(re({},ee),{},{dataStartIndex:T,dataEndIndex:P,updateId:C,graphicalItems:X,stackGroups:J,offset:Q}));return re(re({formattedGraphicalItems:D,graphicalItems:X,offset:Q,stackGroups:J},V),ee)},S=(function(v){function w(A){var O,T,P;return Ade(this,w),P=Ede(this,w,[A]),Me(P,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Me(P,"accessibilityManager",new cde),Me(P,"handleLegendBBoxUpdate",function(C){if(C){var k=P.state,j=k.dataStartIndex,N=k.dataEndIndex,U=k.updateId;P.setState(re({legendBBox:C},g({props:P.props,dataStartIndex:j,dataEndIndex:N,updateId:U},re(re({},P.state),{},{legendBBox:C}))))}}),Me(P,"handleReceiveSyncEvent",function(C,k,j){if(P.props.syncId===C){if(j===P.eventEmitterSymbol&&typeof P.props.syncMethod!="function")return;P.applySyncEvent(k)}}),Me(P,"handleBrushChange",function(C){var k=C.startIndex,j=C.endIndex;if(k!==P.state.dataStartIndex||j!==P.state.dataEndIndex){var N=P.state.updateId;P.setState(function(){return re({dataStartIndex:k,dataEndIndex:j},g({props:P.props,dataStartIndex:k,dataEndIndex:j,updateId:N},P.state))}),P.triggerSyncEvent({dataStartIndex:k,dataEndIndex:j})}}),Me(P,"handleMouseEnter",function(C){var k=P.getMouseInfo(C);if(k){var j=re(re({},k),{},{isTooltipActive:!0});P.setState(j),P.triggerSyncEvent(j);var N=P.props.onMouseEnter;Le(N)&&N(j,C)}}),Me(P,"triggeredAfterMouseMove",function(C){var k=P.getMouseInfo(C),j=k?re(re({},k),{},{isTooltipActive:!0}):{isTooltipActive:!1};P.setState(j),P.triggerSyncEvent(j);var N=P.props.onMouseMove;Le(N)&&N(j,C)}),Me(P,"handleItemMouseEnter",function(C){P.setState(function(){return{isTooltipActive:!0,activeItem:C,activePayload:C.tooltipPayload,activeCoordinate:C.tooltipPosition||{x:C.cx,y:C.cy}}})}),Me(P,"handleItemMouseLeave",function(){P.setState(function(){return{isTooltipActive:!1}})}),Me(P,"handleMouseMove",function(C){C.persist(),P.throttleTriggeredAfterMouseMove(C)}),Me(P,"handleMouseLeave",function(C){P.throttleTriggeredAfterMouseMove.cancel();var k={isTooltipActive:!1};P.setState(k),P.triggerSyncEvent(k);var j=P.props.onMouseLeave;Le(j)&&j(k,C)}),Me(P,"handleOuterEvent",function(C){var k=JX(C),j=sr(P.props,"".concat(k));if(k&&Le(j)){var N,U;/.*touch.*/i.test(k)?U=P.getMouseInfo(C.changedTouches[0]):U=P.getMouseInfo(C),j((N=U)!==null&&N!==void 0?N:{},C)}}),Me(P,"handleClick",function(C){var k=P.getMouseInfo(C);if(k){var j=re(re({},k),{},{isTooltipActive:!0});P.setState(j),P.triggerSyncEvent(j);var N=P.props.onClick;Le(N)&&N(j,C)}}),Me(P,"handleMouseDown",function(C){var k=P.props.onMouseDown;if(Le(k)){var j=P.getMouseInfo(C);k(j,C)}}),Me(P,"handleMouseUp",function(C){var k=P.props.onMouseUp;if(Le(k)){var j=P.getMouseInfo(C);k(j,C)}}),Me(P,"handleTouchMove",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&P.throttleTriggeredAfterMouseMove(C.changedTouches[0])}),Me(P,"handleTouchStart",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&P.handleMouseDown(C.changedTouches[0])}),Me(P,"handleTouchEnd",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&P.handleMouseUp(C.changedTouches[0])}),Me(P,"handleDoubleClick",function(C){var k=P.props.onDoubleClick;if(Le(k)){var j=P.getMouseInfo(C);k(j,C)}}),Me(P,"handleContextMenu",function(C){var k=P.props.onContextMenu;if(Le(k)){var j=P.getMouseInfo(C);k(j,C)}}),Me(P,"triggerSyncEvent",function(C){P.props.syncId!==void 0&&Sx.emit(_x,P.props.syncId,C,P.eventEmitterSymbol)}),Me(P,"applySyncEvent",function(C){var k=P.props,j=k.layout,N=k.syncMethod,U=P.state.updateId,L=C.dataStartIndex,$=C.dataEndIndex;if(C.dataStartIndex!==void 0||C.dataEndIndex!==void 0)P.setState(re({dataStartIndex:L,dataEndIndex:$},g({props:P.props,dataStartIndex:L,dataEndIndex:$,updateId:U},P.state)));else if(C.activeTooltipIndex!==void 0){var G=C.chartX,F=C.chartY,X=C.activeTooltipIndex,J=P.state,ee=J.offset,Q=J.tooltipTicks;if(!ee)return;if(typeof N=="function")X=N(Q,C);else if(N==="value"){X=-1;for(var ne=0;ne=0){var Ce,oe;if(G.dataKey&&!G.allowDuplicatedCategory){var He=typeof G.dataKey=="function"?Oe:"payload.".concat(G.dataKey.toString());Ce=fh(ne,He,X),oe=V&&D&&fh(D,He,X)}else Ce=ne==null?void 0:ne[F],oe=V&&D&&D[F];if(ce||me){var De=C.props.activeIndex!==void 0?C.props.activeIndex:F;return[M.cloneElement(C,re(re(re({},N.props),Te),{},{activeIndex:De})),null,null]}if(!Ue(Ce))return[ie].concat(tl(P.renderActivePoints({item:N,activePoint:Ce,basePoint:oe,childIndex:F,isRange:V})))}else{var Ge,xe=(Ge=P.getItemByXY(P.state.activeCoordinate))!==null&&Ge!==void 0?Ge:{graphicalItem:ie},Qe=xe.graphicalItem,Tt=Qe.item,Ft=Tt===void 0?C:Tt,Mn=Qe.childIndex,nn=re(re(re({},N.props),Te),{},{activeIndex:Mn});return[M.cloneElement(Ft,nn),null,null]}return V?[ie,null,null]:[ie,null]}),Me(P,"renderCustomized",function(C,k,j){return M.cloneElement(C,re(re({key:"recharts-customized-".concat(j)},P.props),P.state))}),Me(P,"renderMap",{CartesianGrid:{handler:Ld,once:!0},ReferenceArea:{handler:P.renderReferenceElement},ReferenceLine:{handler:Ld},ReferenceDot:{handler:P.renderReferenceElement},XAxis:{handler:Ld},YAxis:{handler:Ld},Brush:{handler:P.renderBrush,once:!0},Bar:{handler:P.renderGraphicChild},Line:{handler:P.renderGraphicChild},Area:{handler:P.renderGraphicChild},Radar:{handler:P.renderGraphicChild},RadialBar:{handler:P.renderGraphicChild},Scatter:{handler:P.renderGraphicChild},Pie:{handler:P.renderGraphicChild},Funnel:{handler:P.renderGraphicChild},Tooltip:{handler:P.renderCursor,once:!0},PolarGrid:{handler:P.renderPolarGrid,once:!0},PolarAngleAxis:{handler:P.renderPolarAxis},PolarRadiusAxis:{handler:P.renderPolarAxis},Customized:{handler:P.renderCustomized}}),P.clipPathId="".concat((O=A.id)!==null&&O!==void 0?O:Gc("recharts"),"-clip"),P.throttleTriggeredAfterMouseMove=eF(P.triggeredAfterMouseMove,(T=A.throttleDelay)!==null&&T!==void 0?T:1e3/60),P.state={},P}return kde(w,v),Pde(w,[{key:"componentDidMount",value:function(){var O,T;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(O=this.props.margin.left)!==null&&O!==void 0?O:0,top:(T=this.props.margin.top)!==null&&T!==void 0?T:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var O=this.props,T=O.children,P=O.data,C=O.height,k=O.layout,j=Bn(T,Mr);if(j){var N=j.props.defaultIndex;if(!(typeof N!="number"||N<0||N>this.state.tooltipTicks.length-1)){var U=this.state.tooltipTicks[N]&&this.state.tooltipTicks[N].value,L=M1(this.state,P,N,U),$=this.state.tooltipTicks[N].coordinate,G=(this.state.offset.top+C)/2,F=k==="horizontal",X=F?{x:$,y:G}:{y:$,x:G},J=this.state.formattedGraphicalItems.find(function(Q){var ne=Q.item;return ne.type.name==="Scatter"});J&&(X=re(re({},X),J.props.points[N].tooltipPosition),L=J.props.points[N].tooltipPayload);var ee={activeTooltipIndex:N,isTooltipActive:!0,activeLabel:U,activePayload:L,activeCoordinate:X};this.setState(ee),this.renderCursor(j),this.accessibilityManager.setIndex(N)}}}},{key:"getSnapshotBeforeUpdate",value:function(O,T){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==T.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==O.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==O.margin){var P,C;this.accessibilityManager.setDetails({offset:{left:(P=this.props.margin.left)!==null&&P!==void 0?P:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0}})}return null}},{key:"componentDidUpdate",value:function(O){xw([Bn(O.children,Mr)],[Bn(this.props.children,Mr)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var O=Bn(this.props.children,Mr);if(O&&typeof O.props.shared=="boolean"){var T=O.props.shared?"axis":"item";return l.indexOf(T)>=0?T:o}return o}},{key:"getMouseInfo",value:function(O){if(!this.container)return null;var T=this.container,P=T.getBoundingClientRect(),C=Uee(P),k={chartX:Math.round(O.pageX-C.left),chartY:Math.round(O.pageY-C.top)},j=P.width/T.offsetWidth||1,N=this.inRange(k.chartX,k.chartY,j);if(!N)return null;var U=this.state,L=U.xAxisMap,$=U.yAxisMap,G=this.getTooltipEventType(),F=eI(this.state,this.props.data,this.props.layout,N);if(G!=="axis"&&L&&$){var X=Qi(L).scale,J=Qi($).scale,ee=X&&X.invert?X.invert(k.chartX):null,Q=J&&J.invert?J.invert(k.chartY):null;return re(re({},k),{},{xValue:ee,yValue:Q},F)}return F?re(re({},k),F):null}},{key:"inRange",value:function(O,T){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,C=this.props.layout,k=O/P,j=T/P;if(C==="horizontal"||C==="vertical"){var N=this.state.offset,U=k>=N.left&&k<=N.left+N.width&&j>=N.top&&j<=N.top+N.height;return U?{x:k,y:j}:null}var L=this.state,$=L.angleAxisMap,G=L.radiusAxisMap;if($&&G){var F=Qi($);return gN({x:k,y:j},F)}return null}},{key:"parseEventsOfWrapper",value:function(){var O=this.props.children,T=this.getTooltipEventType(),P=Bn(O,Mr),C={};P&&T==="axis"&&(P.props.trigger==="click"?C={onClick:this.handleClick}:C={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var k=dh(this.props,this.handleOuterEvent);return re(re({},k),C)}},{key:"addListener",value:function(){Sx.on(_x,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Sx.removeListener(_x,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(O,T,P){for(var C=this.state.formattedGraphicalItems,k=0,j=C.length;ke==="all"||l.status===e);return E.jsx("section",{id:"portfolio",className:"bg-warmwhite py-20 md:py-24",children:E.jsxs("div",{className:"max-w-[1440px] mx-auto px-5 md:px-20",children:[E.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-end lg:justify-between gap-6",children:[E.jsxs(ot,{children:[E.jsx("p",{className:"text-[12px] font-semibold tracking-[0.14em] text-gold uppercase mb-3",children:"Land Portfolio"}),E.jsx("h2",{className:"font-display text-4xl md:text-5xl text-navy leading-[1.1] tracking-[-0.01em]",children:"Strategic Parcels Across Qatar"}),E.jsx("p",{className:"text-base text-alslate mt-2 max-w-[640px]",children:"Entitled land positions in confirmed urban growth corridors. Click any parcel for detailed entitlement and valuation data."})]}),E.jsx(ot,{delay:.1,children:E.jsx("div",{className:"flex flex-wrap gap-2",children:Yde.map(l=>E.jsx("button",{onClick:()=>t(l.key),className:`px-5 py-2 rounded-sm text-sm transition-all duration-200 ${e===l.key?"bg-navy text-warmwhite":"bg-transparent border border-alslate/30 text-alslate hover:border-gold hover:text-gold"}`,children:l.label},l.label))})})]}),E.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-10 mt-12",children:[E.jsx(ot,{className:"lg:col-span-7",duration:.8,children:E.jsxs("div",{className:"relative bg-sand border border-gold/15 rounded-lg overflow-hidden h-[400px] md:h-[560px]",children:[E.jsxs("svg",{viewBox:"0 0 360 480",className:"w-full h-full",preserveAspectRatio:"xMidYMid meet",children:[E.jsx("rect",{x:"0",y:"0",width:"360",height:"480",fill:"#1E2A3A",opacity:"0.06"}),E.jsx("path",{d:"M 150 450 C 230 445 262 410 258 370 L 252 330 L 248 290 L 254 250 L 248 215 L 232 185 L 205 168 L 180 175 L 170 205 L 162 245 L 150 290 L 142 335 L 138 380 L 145 425 Z",fill:"#F5F0E8",stroke:"#6B7280",strokeWidth:"1",strokeOpacity:"0.4"}),E.jsxs("g",{stroke:"#6B7280",strokeWidth:"1",strokeOpacity:"0.2",strokeDasharray:"4 4",fill:"none",children:[E.jsx("path",{d:"M 170 205 L 248 215"}),E.jsx("path",{d:"M 150 290 L 252 280"}),E.jsx("path",{d:"M 142 335 L 258 330"}),E.jsx("path",{d:"M 180 175 L 205 168 L 232 185"})]}),E.jsxs("g",{fill:"#6B7280",fontSize:"9",fontFamily:"Inter, sans-serif",fontWeight:"500",letterSpacing:"0.08em",children:[E.jsx("text",{x:"200",y:"160",textAnchor:"middle",children:"AL KHOR"}),E.jsx("text",{x:"225",y:"230",textAnchor:"middle",children:"LUSAIL"}),E.jsx("text",{x:"300",y:"190",textAnchor:"middle",children:"THE PEARL"}),E.jsx("text",{x:"292",y:"222",textAnchor:"middle",children:"WEST BAY"}),E.jsx("text",{x:"266",y:"295",textAnchor:"middle",children:"DOHA"}),E.jsx("text",{x:"240",y:"395",textAnchor:"middle",children:"AL WAKRA"})]}),rI.filter(l=>s.includes(l)).map(l=>{const c=(n==null?void 0:n.id)===l.id,f=(i==null?void 0:i.id)===l.id,h=parseFloat(l.pts.split(" ")[0])+18,p=parseFloat(l.pts.split(" ")[1])+14;return E.jsxs("g",{children:[c&&E.jsx("circle",{cx:h,cy:p,r:"22",fill:"#C5A059",opacity:"0.25"}),E.jsx("polygon",{points:l.pts,fill:Zde[l.status],fillOpacity:c?.5:f?.35:.15,stroke:c?"#9A7B3D":"#C5A059",strokeWidth:c?2:1.5,style:{cursor:"pointer",transition:"fill-opacity 0.25s, stroke-width 0.25s",filter:c||f?"drop-shadow(0 0 8px rgba(197,160,89,0.3))":"none"},onClick:()=>r(l),onMouseEnter:()=>o(l),onMouseLeave:()=>o(null),role:"button","aria-label":`Parcel ${l.id} ${l.name}`})]},l.id)})]}),E.jsxs("div",{className:"absolute bottom-4 left-4 bg-warmwhite/90 backdrop-blur-sm px-4 py-3 rounded-sm",children:[E.jsx("p",{className:"text-[11px] font-semibold tracking-[0.1em] text-navy uppercase mb-2",children:"Parcel Status"}),E.jsxs("div",{className:"flex flex-col gap-1.5",children:[E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsx("span",{className:"w-3 h-3 bg-gold"}),E.jsx("span",{className:"text-[13px] text-charcoal",children:"Entitled / Development Ready"})]}),E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsx("span",{className:"w-3 h-3 bg-alslate"}),E.jsx("span",{className:"text-[13px] text-charcoal",children:"Under Entitlement"})]})]})]})]})}),E.jsx(ot,{className:"lg:col-span-5",delay:.2,children:E.jsx("div",{className:"bg-navy p-8 md:p-10 rounded-lg h-full min-h-[400px] md:min-h-[560px] flex flex-col",children:n?E.jsxs("div",{className:"flex-1 flex flex-col",children:[E.jsx("p",{className:"text-[12px] font-mono text-gold",children:n.id}),E.jsx("h4",{className:"font-display text-2xl text-warmwhite mt-1",children:n.name}),E.jsx("div",{className:"h-px bg-pearl/30 my-5"}),E.jsxs("dl",{className:"grid grid-cols-2 gap-y-4 gap-x-4",children:[[["Area",n.area],["Zoning",n.zoning],["Max GFA",n.gfa],["Height Limit",n.height],["Acquisition",n.acq],["Book Value",n.book]].map(([l,c])=>E.jsxs("div",{children:[E.jsx("dt",{className:"text-[11px] font-semibold tracking-[0.08em] text-alslate uppercase",children:l}),E.jsx("dd",{className:"text-[15px] text-warmwhite mt-0.5",children:c})]},l)),E.jsxs("div",{children:[E.jsx("dt",{className:"text-[11px] font-semibold tracking-[0.08em] text-alslate uppercase",children:"Est. Market Value"}),E.jsx("dd",{className:"text-[15px] text-gold mt-0.5 font-semibold",children:n.market})]}),E.jsxs("div",{children:[E.jsx("dt",{className:"text-[11px] font-semibold tracking-[0.08em] text-alslate uppercase",children:"Status"}),E.jsx("dd",{className:"text-[15px] text-alsuccess mt-0.5",children:n.statusLabel})]})]}),E.jsx("div",{className:"h-px bg-pearl/30 my-5"}),E.jsx("p",{className:"text-[13px] text-warmwhite/80 leading-relaxed",children:n.dev}),E.jsxs("button",{className:"mt-6 w-full px-6 py-3 border border-gold text-gold text-sm font-semibold tracking-[0.06em] rounded-sm hover:bg-gold hover:text-navy transition-all duration-200 inline-flex items-center justify-center gap-2",children:[E.jsx(cp,{className:"w-4 h-4"})," Download Parcel Datasheet (PDF)"]})]}):E.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center text-center",children:[E.jsx($5,{className:"w-12 h-12 text-gold/50 mb-4"}),E.jsx("p",{className:"text-warmwhite/70 max-w-[240px]",children:"Select a parcel on the map to view detailed entitlement, zoning, and valuation data."})]})})})]})]})})}const ehe=[{n:"01",name:"Lusail City",desc:"Qatar's newest downtown and largest single master-planned development. Alrazah holds entitled parcels in Lusail's Marina, Fox Hills, and Waterfront districts — all with mixed-use zoning and full infrastructure servicing.",land:"850,000 SQM",entitled:"100%",gdv:"QAR 4.2B",parcels:"12 Parcels",status:"ACTIVE DEVELOPMENT"},{n:"02",name:"The Pearl-Qatar",desc:"The iconic artificial island and premier residential address. Our entitled parcels include waterfront residential plots and marina-adjacent mixed-use positions with some of the highest per-SQM land values in the nation.",land:"320,000 SQM",entitled:"100%",gdv:"QAR 3.8B",parcels:"6 Parcels",status:"ACTIVE DEVELOPMENT"},{n:"03",name:"West Bay",desc:"Doha's central business district and diplomatic quarter. Our land bank here is fully entitled for Grade A commercial and luxury residential — positions that benefit from Doha's sustained demand for premium CBD stock.",land:"180,000 SQM",entitled:"100%",gdv:"QAR 2.9B",parcels:"4 Parcels",status:"STRATEGIC HOLD"},{n:"04",name:"Al Wakra",desc:"The southern growth corridor, benefiting from Hamad International Airport expansion and the Doha Metro Red Line. Our parcels are entitled for residential and light commercial, targeting the expanding middle-income demographic.",land:"420,000 SQM",entitled:"85%",gdv:"QAR 1.4B",parcels:"8 Parcels",status:"UNDER ENTITLEMENT"},{n:"05",name:"Al Khor",desc:"The northern industrial and logistics corridor, strategically positioned for Qatar's energy sector workforce and North Field expansion. Our parcels serve industrial, logistics, and worker housing demand.",land:"680,000 SQM",entitled:"72%",gdv:"QAR 1.1B",parcels:"10 Parcels",status:"UNDER ENTITLEMENT"},{n:"06",name:"Doha Central",desc:"Infill positions within the established urban fabric. These parcels are entitled for mid-rise residential and neighborhood retail, serving urban densification objectives.",land:"350,000 SQM",entitled:"100%",gdv:"QAR 0.8B",parcels:"7 Parcels",status:"ACTIVE DEVELOPMENT"}];function the(){return E.jsx("section",{id:"corridors",className:"bg-navy py-20 md:py-24",children:E.jsxs("div",{className:"max-w-[1440px] mx-auto px-5 md:px-20",children:[E.jsx("div",{className:"text-center max-w-[800px] mx-auto",children:E.jsxs(ot,{children:[E.jsx("p",{className:"text-[12px] font-semibold tracking-[0.14em] text-gold uppercase mb-3",children:"Growth Corridors"}),E.jsx("h2",{className:"font-display text-4xl md:text-5xl text-warmwhite leading-[1.1] tracking-[-0.01em]",children:"Entitled Positions in Qatar's Priority Zones"}),E.jsx("p",{className:"text-lg md:text-xl text-warmwhite/85 leading-relaxed mt-4",children:"Our land bank is concentrated exclusively in corridors validated by Qatar's national infrastructure investment and population growth projections."})]})}),E.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mt-16",children:ehe.map((e,t)=>E.jsx(ot,{delay:t*.1,children:E.jsxs("div",{className:"bg-sand/5 border border-pearl/15 rounded-lg p-8 md:p-10 h-full hover:bg-sand/[0.08] hover:border-gold/40 transition-all duration-300 flex flex-col",children:[E.jsx("span",{className:"font-display text-5xl text-gold opacity-40 leading-none",children:e.n}),E.jsx("h3",{className:"font-display text-2xl md:text-3xl text-warmwhite mt-2",children:e.name}),E.jsx("p",{className:"text-[13px] text-warmwhite/75 leading-relaxed mt-3 flex-1",children:e.desc}),E.jsx("div",{className:"w-6 h-0.5 bg-gold mt-6"}),E.jsxs("dl",{className:"mt-4 space-y-1.5",children:[E.jsxs("div",{className:"flex justify-between text-[13px]",children:[E.jsx("dt",{className:"text-warmwhite/60",children:"Land Bank"}),E.jsx("dd",{className:"text-warmwhite",children:e.land})]}),E.jsxs("div",{className:"flex justify-between text-[13px]",children:[E.jsx("dt",{className:"text-warmwhite/60",children:"Entitled"}),E.jsx("dd",{className:"text-warmwhite",children:e.entitled})]}),E.jsxs("div",{className:"flex justify-between text-[13px]",children:[E.jsx("dt",{className:"text-warmwhite/60",children:"Est. GDV"}),E.jsx("dd",{className:"text-gold",children:e.gdv})]})]}),E.jsxs("div",{className:"flex items-center justify-between mt-5",children:[E.jsx("span",{className:"text-[11px] text-alslate tracking-[0.08em] uppercase",children:e.parcels}),E.jsx("span",{className:"text-[11px] bg-gold/20 text-gold px-2.5 py-1 rounded-sm tracking-[0.06em]",children:e.status})]})]})},e.n))})]})})}const iI=[{n:"01",title:"Land Acquisition",desc:"Strategic acquisition within QNV 2030 priority corridors, with preliminary zoning verification and title due diligence."},{n:"02",title:"Zoning Entitlement",desc:"Formal zoning designation through the Ministry of Municipality and Environment (MME), including land use, density, height, and setback confirmations."},{n:"03",title:"Infrastructure Servicing",desc:"Coordination with Qatar General Electricity & Water Corporation (KAHRAMAA) and Ashghal for road, utility, and drainage connections."},{n:"04",title:"Development Permit",desc:"Final building permits and construction approvals, rendering the parcel development-ready and financeable."}],nhe=["MME Zoning Entitlements — 100% of portfolio","KAHRAMAA Utility Connections — 94% of portfolio","Ashghal Road Access Agreements — 89% of portfolio","QFC / QSTP Alignment (where applicable) — 3 parcels","QFMA Disclosure Compliance — 100%"];function rhe(){return E.jsx("section",{id:"entitlements",className:"bg-sand py-20 md:py-24",children:E.jsxs("div",{className:"max-w-[1440px] mx-auto px-5 md:px-20",children:[E.jsxs(ot,{children:[E.jsx("p",{className:"text-[12px] font-semibold tracking-[0.14em] text-gold uppercase mb-3",children:"Entitlements & Compliance"}),E.jsx("h2",{className:"font-display text-4xl md:text-5xl text-navy leading-[1.1] tracking-[-0.01em]",children:"Permission Before Capital"}),E.jsx("p",{className:"text-base text-charcoal max-w-[680px] mt-3 leading-relaxed",children:"Every parcel in the Alrazah land bank carries confirmed zoning, infrastructure servicing agreements, and development permits. We do not hold raw land. We hold entitled development rights."})]}),E.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-12 mt-12",children:[E.jsx("div",{children:iI.map((e,t)=>E.jsx(ot,{delay:t*.15,children:E.jsxs("div",{className:"flex gap-6",children:[E.jsxs("div",{className:"flex flex-col items-center",children:[E.jsx("div",{className:"w-10 h-10 rounded-full border-2 border-gold flex items-center justify-center font-display text-navy bg-gold text-base",children:e.n}),tE.jsxs("li",{className:"flex items-start gap-3",children:[E.jsx(C5,{className:"w-4 h-4 text-alsuccess mt-1 shrink-0"}),E.jsx("span",{className:"text-base text-charcoal",children:e})]},e))}),E.jsx("p",{className:"text-[13px] text-alslate italic mt-8 pt-5 border-t border-gold/15",children:"Independent legal and technical due diligence is conducted on every acquisition by Tier 1 Qatari law firms and engineering consultancies."})]})})]})]})})}function ihe({to:e,duration:t=1.5,decimals:n=0,prefix:r="",suffix:i=""}){const o=M.useRef(null),s=GQ(o,{once:!0,amount:.3}),[l,c]=M.useState(0);M.useEffect(()=>{if(!s)return;let h=null;const p=y=>{h||(h=y);const g=Math.min((y-h)/(t*1e3),1),S=g>=1?1:1-Math.pow(2,-10*g);c(e*S),g<1?requestAnimationFrame(p):c(e)};requestAnimationFrame(p)},[s,e,t]);const f=l.toLocaleString("en-US",{minimumFractionDigits:n,maximumFractionDigits:n});return E.jsxs("span",{ref:o,children:[r,f,i]})}const ohe=[{figure:14.2,prefix:"QAR ",suffix:"B",label:"Total Land Bank GDV",change:"+22.4% YoY",decimals:1},{figure:2.8,prefix:"",suffix:"M SQM",label:"Total Land Area",change:"+8.5% YoY",decimals:1},{figure:94,prefix:"",suffix:"%",label:"Entitled & Zoned",change:"+6.0pp YoY",decimals:0},{figure:5071,prefix:"QAR ",suffix:"",label:"Avg. SQM Value",change:"+12.8% YoY",decimals:0},{figure:47,prefix:"",suffix:"",label:"Total Parcels",change:"+4 YoY",decimals:0}],ahe=[["Lusail","QAR 1.2B","QAR 2.8B","+133%"],["The Pearl","QAR 980M","QAR 2.1B","+114%"],["West Bay","QAR 640M","QAR 1.4B","+119%"],["Al Wakra","QAR 380M","QAR 620M","+63%"],["Al Khor","QAR 290M","QAR 480M","+66%"],["Doha Central","QAR 210M","QAR 380M","+81%"]];function she(){return E.jsx("section",{id:"investor-data",className:"bg-navy py-20 md:py-24",children:E.jsxs("div",{className:"max-w-[1440px] mx-auto px-5 md:px-20",children:[E.jsxs(ot,{children:[E.jsx("p",{className:"text-[12px] font-semibold tracking-[0.14em] text-gold uppercase mb-3",children:"Investor Information"}),E.jsx("h2",{className:"font-display text-4xl md:text-5xl text-warmwhite leading-[1.1] tracking-[-0.01em]",children:"Land Bank Valuation & Performance"})]}),E.jsx("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-px bg-pearl/20 mt-12 rounded-lg overflow-hidden",children:ohe.map((e,t)=>E.jsx(ot,{delay:t*.1,className:"bg-navy",children:E.jsxs("div",{className:"text-center px-4 py-8 md:py-10",children:[E.jsx("p",{className:"font-display font-light text-4xl md:text-6xl text-gold leading-none tracking-[-0.02em]",children:E.jsx(ihe,{to:e.figure,prefix:e.prefix,suffix:e.suffix,decimals:e.decimals})}),E.jsx("p",{className:"text-[13px] text-warmwhite/80 mt-2",children:e.label}),E.jsx("p",{className:"text-[11px] text-alsuccess mt-1 tracking-[0.08em] uppercase",children:e.change})]})},e.label))}),E.jsx("div",{className:"h-px bg-pearl/20 my-16"}),E.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8",children:[E.jsx(ot,{children:E.jsxs("div",{className:"bg-sand/5 p-8 md:p-10 rounded-lg",children:[E.jsx("h4",{className:"font-sans font-semibold text-xl text-warmwhite",children:"Independent Valuation Framework"}),E.jsx("p",{className:"text-base text-warmwhite/80 leading-relaxed mt-3",children:"Land bank valuations are conducted semi-annually by independent RICS-accredited firms using a combination of comparable sales analysis, residual land valuation based on permitted GFA and estimated development value, and discounted cash flow for income-generating land leases."}),E.jsx("div",{className:"mt-6 overflow-x-auto",children:E.jsxs("table",{className:"w-full min-w-[480px]",children:[E.jsx("thead",{children:E.jsxs("tr",{className:"border-b border-pearl/30",children:[E.jsx("th",{className:"text-left text-[11px] font-semibold tracking-[0.08em] text-gold uppercase py-3",children:"Corridor"}),E.jsx("th",{className:"text-right text-[11px] font-semibold tracking-[0.08em] text-gold uppercase py-3",children:"Book Value"}),E.jsx("th",{className:"text-right text-[11px] font-semibold tracking-[0.08em] text-gold uppercase py-3",children:"Market Value"}),E.jsx("th",{className:"text-right text-[11px] font-semibold tracking-[0.08em] text-gold uppercase py-3",children:"Surplus"})]})}),E.jsxs("tbody",{children:[ahe.map(e=>E.jsxs("tr",{className:"border-b border-pearl/15",children:[E.jsx("td",{className:"text-[13px] text-warmwhite py-4",children:e[0]}),E.jsx("td",{className:"text-[13px] text-warmwhite py-4 text-right font-mono",children:e[1]}),E.jsx("td",{className:"text-[13px] text-warmwhite py-4 text-right font-mono",children:e[2]}),E.jsx("td",{className:"text-[13px] text-gold py-4 text-right font-mono",children:e[3]})]},e[0])),E.jsxs("tr",{className:"border-t-2 border-gold",children:[E.jsx("td",{className:"text-sm text-warmwhite font-semibold py-4",children:"Total"}),E.jsx("td",{className:"text-sm text-warmwhite font-semibold py-4 text-right font-mono",children:"QAR 3.7B"}),E.jsx("td",{className:"text-sm text-warmwhite font-semibold py-4 text-right font-mono",children:"QAR 7.8B"}),E.jsx("td",{className:"text-sm text-gold font-semibold py-4 text-right font-mono",children:"+111%"})]})]})]})}),E.jsxs("button",{className:"mt-8 inline-flex items-center gap-2 px-7 py-3.5 border border-gold text-gold text-sm font-semibold tracking-[0.06em] rounded-sm hover:bg-gold hover:text-navy transition-all duration-200",children:[E.jsx(cp,{className:"w-4 h-4"})," Download Independent Valuation Report (PDF)"]})]})}),E.jsx(ot,{delay:.2,children:E.jsxs("div",{id:"investment",className:"flex flex-col gap-8",children:[E.jsxs("div",{className:"bg-sand/5 p-8 md:p-10 rounded-lg",children:[E.jsx("h4",{className:"font-sans font-semibold text-xl text-warmwhite",children:"Monetization Strategy"}),E.jsx("p",{className:"text-base text-warmwhite/80 leading-relaxed mt-3",children:"The land bank is monetized through three primary channels: direct development by Alrazah subsidiaries (60% of GDV), joint ventures with strategic capital partners (30%), and selective land divestment to qualified developers (10%). This blended approach optimizes risk-adjusted returns while preserving development optionality."}),E.jsxs("div",{className:"mt-6",children:[E.jsxs("div",{className:"flex h-6 rounded-sm overflow-hidden",children:[E.jsx("div",{className:"bg-gold",style:{width:"60%"}}),E.jsx("div",{className:"bg-pearl",style:{width:"30%"}}),E.jsx("div",{className:"bg-alslate",style:{width:"10%"}})]}),E.jsxs("div",{className:"flex justify-between mt-2 text-[11px] text-warmwhite tracking-[0.06em] uppercase",children:[E.jsx("span",{children:"Direct Dev: 60%"}),E.jsx("span",{children:"JVs: 30%"}),E.jsx("span",{children:"Divest: 10%"})]})]})]}),E.jsxs("div",{className:"bg-sand/5 p-8 md:p-10 rounded-lg",children:[E.jsx("h4",{className:"font-sans font-semibold text-xl text-warmwhite",children:"Development Timeline"}),E.jsx("ul",{className:"mt-5 space-y-4",children:[["2025–2027","Active development of 1.2M SQM entitled land across Lusail and The Pearl. Target GDV realization: QAR 6.8B."],["2028–2030","Joint venture activation of Al Wakra and Al Khor parcels. Target GDV realization: QAR 4.2B."],["2030–2035","Strategic hold and phased monetization of West Bay and Doha Central infill positions. Target GDV realization: QAR 3.2B."]].map(([e,t])=>E.jsxs("li",{className:"flex gap-4",children:[E.jsx("span",{className:"text-[11px] text-gold font-mono tracking-[0.08em] uppercase w-24 shrink-0 pt-0.5",children:e}),E.jsx("span",{className:"text-[13px] text-warmwhite/80 leading-relaxed",children:t})]},e))})]})]})})]})]})})}const lhe=[{icon:j5,title:"Joint Development",body:"Alrazah contributes entitled land; partner contributes construction capital and/or operational expertise. Profits shared pro-rata based on appraised land value at commencement and capital contributed.",cta:"Request JV Termsheet →"},{icon:V5,title:"Strategic Divestment",body:"Select parcels are available for outright sale to qualified Qatari and GCC developers. All divestments include full entitlement transfer and Alrazah project management oversight through construction completion.",cta:"View Divestment Catalogue →"},{icon:GI,title:"Landowner Partnership",body:"For landowners with unentitled positions in priority corridors, Alrazah offers co-entitlement partnerships. We fund and execute the entitlement process in exchange for a development participation right.",cta:"Submit Land Proposal →"}];function uhe(){return E.jsx("section",{id:"partnerships",className:"bg-gold py-20 md:py-24",children:E.jsxs("div",{className:"max-w-[1440px] mx-auto px-5 md:px-20",children:[E.jsx("div",{className:"text-center max-w-[840px] mx-auto",children:E.jsxs(ot,{children:[E.jsx("h2",{className:"font-display text-4xl md:text-5xl text-navy leading-[1.1] tracking-[-0.01em]",children:"Partner on Qatar's Strategic Ground"}),E.jsx("p",{className:"text-lg md:text-xl text-navy/85 leading-relaxed mt-4",children:"Alrazah Holding offers joint venture structures for entitled land development, landowner partnerships for co-entitlement, and strategic divestment of select parcels to qualified institutional developers. Our legal and project management capabilities ensure seamless execution from land to lease."})]})}),E.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 mt-12",children:lhe.map((e,t)=>E.jsx(ot,{delay:t*.1,children:E.jsxs("div",{className:"bg-navy/[0.06] border border-navy/15 rounded-lg p-8 md:p-10 h-full hover:bg-navy/10 hover:border-navy/30 hover:-translate-y-1 transition-all duration-300 flex flex-col",children:[E.jsx(e.icon,{className:"w-12 h-12 text-navy",strokeWidth:1.5}),E.jsx("h4",{className:"font-sans font-semibold text-xl text-navy mt-6",children:e.title}),E.jsx("p",{className:"text-base text-navy/80 leading-relaxed mt-3 flex-1",children:e.body}),E.jsx("a",{href:"#",className:"text-sm text-navy font-medium mt-6 hover:underline underline-offset-4 inline-block",children:e.cta})]})},e.title))}),E.jsx(ot,{delay:.2,children:E.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4 mt-12",children:[E.jsx("button",{className:"px-8 py-4 bg-navy text-warmwhite text-sm font-semibold tracking-[0.06em] rounded-sm hover:bg-charcoal hover:-translate-y-0.5 transition-all duration-200",children:"Contact Land Strategy Team"}),E.jsxs("button",{className:"inline-flex items-center gap-2 px-8 py-4 border border-navy text-navy text-sm font-semibold tracking-[0.06em] rounded-sm hover:bg-navy hover:text-warmwhite transition-all duration-200",children:[E.jsx(cp,{className:"w-4 h-4"})," Download Partnership Framework (PDF)"]})]})})]})})}const che=[{icon:N5,title:"Environmental Site Assessment",body:"All parcels undergo Phase I and Phase II environmental site assessments prior to acquisition. Contaminated or environmentally sensitive land is excluded from our portfolio. Where historical industrial use is detected, remediation is budgeted and executed before development.",cta:"View ESG Land Policy →"},{icon:GI,title:"Community Impact Mitigation",body:"Land entitlement processes include stakeholder engagement with affected communities, particularly for parcels near established neighborhoods. Our developments include community facility mandates and accessible public realm contributions.",cta:"Community Engagement Framework →"},{icon:q5,title:"Transparent Land Governance",body:"As a QSE-listed entity, all material land acquisitions and divestments are disclosed to the Qatar Stock Exchange within regulatory timeframes. Independent land valuations are conducted semi-annually and published in our annual report.",cta:"Land Governance Disclosure →"}];function fhe(){return E.jsx("section",{className:"bg-warmwhite py-20 md:py-24",children:E.jsxs("div",{className:"max-w-[1440px] mx-auto px-5 md:px-20",children:[E.jsx("div",{className:"text-center max-w-[720px] mx-auto",children:E.jsxs(ot,{children:[E.jsx("p",{className:"text-[12px] font-semibold tracking-[0.14em] text-gold uppercase mb-3",children:"Sustainability"}),E.jsx("h2",{className:"font-display text-4xl md:text-5xl text-navy leading-[1.1] tracking-[-0.01em]",children:"Responsible Stewardship of Qatar's Territory"}),E.jsx("p",{className:"text-lg md:text-xl text-charcoal leading-relaxed mt-4",children:"Land banking carries environmental and social responsibilities. Alrazah integrates sustainability into land holding, entitlement, and development readiness."})]})}),E.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 mt-16",children:che.map((e,t)=>E.jsx(ot,{delay:t*.15,children:E.jsxs("div",{className:"bg-sand border border-gold/15 rounded-lg p-8 md:p-10 h-full flex flex-col",children:[E.jsx(e.icon,{className:"w-12 h-12 text-gold",strokeWidth:1.5}),E.jsx("h4",{className:"font-sans font-semibold text-xl text-navy mt-6",children:e.title}),E.jsx("p",{className:"text-base text-charcoal leading-relaxed mt-3 flex-1",children:e.body}),E.jsx("a",{href:"#",className:"text-sm text-gold font-medium mt-5 hover:underline underline-offset-4 inline-block",children:e.cta})]})},e.title))}),E.jsx(ot,{delay:.2,children:E.jsxs("div",{className:"bg-navy border-l-4 border-gold p-8 md:p-12 mt-16 flex flex-col md:flex-row md:items-center md:justify-between gap-6",children:[E.jsx("h3",{className:"font-display text-2xl md:text-3xl text-warmwhite leading-snug max-w-2xl",children:"100% of land bank subject to independent environmental due diligence"}),E.jsx("p",{className:"font-display font-light text-3xl md:text-4xl text-gold text-right shrink-0",children:"0 parcels with unresolved environmental liability"})]})})]})})}const dhe=[{label:"Residential",sub:"Apartments, Villas & Communities",img:"https://media.base44.com/images/public/6a7a7bb337b3bcbc6dafc972/09651e94a_generated_850c0c32.png"},{label:"Mixed-Use",sub:"Integrated Urban Districts",img:"https://media.base44.com/images/public/6a7a7bb337b3bcbc6dafc972/21c4bbc81_generated_8a8767e0.png"},{label:"Commercial & Administrative",sub:"Grade A Offices & Retail",img:"https://media.base44.com/images/public/6a7a7bb337b3bcbc6dafc972/f35b7fd13_generated_9d23bb82.png"}];function hhe(){return E.jsx("section",{className:"bg-sand py-20 md:py-24",children:E.jsxs("div",{className:"max-w-[1440px] mx-auto px-5 md:px-20",children:[E.jsxs(ot,{children:[E.jsx("p",{className:"text-[12px] font-semibold tracking-[0.14em] text-gold uppercase mb-3",children:"Monetization Verticals"}),E.jsx("h2",{className:"font-display text-4xl md:text-5xl text-navy leading-[1.1] tracking-[-0.01em]",children:"From Land to Landmark"})]}),E.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 mt-12",children:dhe.map((e,t)=>E.jsx(ot,{delay:t*.1,children:E.jsxs("a",{href:"#",className:"relative block w-full h-[400px] rounded-lg overflow-hidden group",children:[E.jsx("img",{src:e.img,alt:e.label,loading:"lazy",className:"absolute inset-0 w-full h-full object-cover transition-transform duration-[600ms] group-hover:scale-105"}),E.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(0deg, rgba(10,22,40,0.94) 0%, rgba(10,22,40,0.50) 55%, rgba(10,22,40,0.08) 100%)"}}),E.jsxs("div",{className:"absolute bottom-0 left-0 right-0 p-8",children:[E.jsx("p",{className:"text-[11px] font-semibold tracking-[0.14em] text-gold uppercase mb-2",children:e.label}),E.jsx("h4",{className:"font-display text-2xl text-warmwhite",children:e.sub}),E.jsxs("span",{className:"inline-flex items-center gap-1.5 text-sm text-gold mt-3",children:["Explore ",E.jsx(q1,{className:"w-3.5 h-3.5"})]})]})]})},e.label))})]})})}const phe=[{title:"Our Business",links:["Real Estate","Logistics & Industrial","Asset Management","Project Management"]},{title:"Investor Relations",links:["Financial Reports","Stock Information","Governance","AGM Materials","Contact IR"]}];function mhe(){return E.jsx("footer",{className:"bg-navy pt-20 md:pt-24 pb-12",children:E.jsxs("div",{className:"max-w-[1440px] mx-auto px-5 md:px-20",children:[E.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-12",children:[E.jsxs("div",{children:[E.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[E.jsx("span",{className:"font-display text-warmwhite text-2xl tracking-tight",children:"ALRAZAH"}),E.jsx("span",{className:"text-gold text-[10px] font-mono tracking-[0.3em] mt-1",children:"HOLDING"})]}),E.jsx("p",{className:"text-[13px] text-alslate leading-relaxed max-w-[300px]",children:"A Qatari public shareholding company listed on the Qatar Stock Exchange. Building Qatar's future since 2008."}),E.jsx("div",{className:"flex items-center gap-3 mt-6",children:[D5,H5,X5].map((e,t)=>E.jsx("a",{href:"#",className:"w-10 h-10 rounded-full border border-pearl flex items-center justify-center text-warmwhite hover:bg-gold hover:border-gold hover:text-navy transition-all duration-200","aria-label":"social",children:E.jsx(e,{className:"w-4 h-4"})},t))})]}),phe.map(e=>E.jsxs("div",{children:[E.jsx("h4",{className:"font-sans font-semibold text-sm text-gold tracking-[0.06em] uppercase mb-5",children:e.title}),E.jsx("ul",{className:"space-y-3",children:e.links.map(t=>E.jsx("li",{children:E.jsx("a",{href:"#",className:"text-[13px] text-warmwhite hover:text-gold hover:translate-x-1 inline-block transition-all duration-200",children:t})},t))})]},e.title)),E.jsxs("div",{children:[E.jsx("h4",{className:"font-sans font-semibold text-sm text-gold tracking-[0.06em] uppercase mb-5",children:"Contact"}),E.jsxs("address",{className:"not-italic text-[13px] text-warmwhite/80 leading-relaxed space-y-1",children:[E.jsxs("p",{children:["Alrazah Tower, West Bay,",E.jsx("br",{}),"Doha, State of Qatar"]}),E.jsx("p",{className:"font-mono",children:"+974 4444 5555"}),E.jsx("p",{className:"font-mono text-gold",children:"info@alrazahholding.qa"})]}),E.jsxs("div",{className:"mt-5",children:[E.jsx("p",{className:"text-[11px] text-alslate tracking-[0.08em] uppercase mb-2",children:"Subscribe to Investor Updates"}),E.jsxs("div",{className:"flex",children:[E.jsx("input",{type:"email",placeholder:"Email address",className:"flex-1 bg-transparent border border-pearl/30 px-3 py-2.5 text-[13px] text-warmwhite placeholder:text-alslate rounded-l-sm focus:outline-none focus:border-gold"}),E.jsx("button",{className:"px-4 bg-gold text-navy rounded-r-sm hover:bg-deepgold transition-colors","aria-label":"Subscribe",children:E.jsx(q1,{className:"w-4 h-4"})})]})]})]})]}),E.jsxs("div",{className:"border-t border-pearl/10 mt-12 pt-6 flex flex-col md:flex-row md:items-center md:justify-between gap-3",children:[E.jsx("p",{className:"text-[13px] text-alslate",children:"© 2026 Alrazah Holding Q.P.S.C. All rights reserved."}),E.jsx("div",{className:"flex items-center gap-5 text-[13px] text-alslate",children:["Privacy Policy","Terms of Use","Accessibility","Sitemap"].map(e=>E.jsx("a",{href:"#",className:"hover:text-warmwhite transition-colors",children:e},e))})]})]})})}function oI(){return E.jsxs("div",{className:"bg-sand font-body text-charcoal min-h-screen",children:[E.jsx(xK,{}),E.jsxs("main",{className:"pt-0",children:[E.jsx(YQ,{}),E.jsx(ZQ,{}),E.jsx(Xde,{}),E.jsx(Jde,{}),E.jsx(the,{}),E.jsx(rhe,{}),E.jsx(she,{}),E.jsx(uhe,{}),E.jsx(fhe,{}),E.jsx(hhe,{})]}),E.jsx(mhe,{})]})}const yhe=()=>{const{isLoadingAuth:e,isLoadingPublicSettings:t,authError:n,navigateToLogin:r}=pK();if(t||e)return E.jsx("div",{className:"fixed inset-0 flex items-center justify-center",children:E.jsx("div",{className:"w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin"})});if(n){if(n.type==="user_not_registered")return E.jsx(mK,{});if(n.type==="auth_required")return r(),null}return E.jsxs(p8,{children:[E.jsx(Fd,{path:"/",element:E.jsx(oI,{})}),E.jsx(Fd,{path:"/our-business/real-estate/land-bank",element:E.jsx(oI,{})}),E.jsx(Fd,{path:"*",element:E.jsx(dK,{})})]})};function vhe(){return E.jsx(hK,{children:E.jsxs(mV,{client:TV,children:[E.jsxs(v8,{children:[E.jsx(vK,{}),E.jsx(yhe,{})]}),E.jsx(zz,{})]})})}yq.createRoot(document.getElementById("root")).render(E.jsx(vhe,{}));